summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Ragwitz <rafl@debian.org>2010-12-15 01:00:30 +0100
committerFlorian Ragwitz <rafl@debian.org>2010-12-15 01:14:17 +0100
commit6b217b36163b5443c055a23c59d582cd363bb7b1 (patch)
treea4e0afb0fdcdcb5436927b6ccb9ef249d749e970
parent9cc8ef8a050499e8a7c407263539c9b21d850880 (diff)
downloadperl-6b217b36163b5443c055a23c59d582cd363bb7b1.tar.gz
Dual-life Dumpvalue
-rw-r--r--MANIFEST4
-rwxr-xr-xPorting/Maintainers.pl9
-rw-r--r--dist/Dumpvalue/lib/Dumpvalue.pm (renamed from lib/Dumpvalue.pm)0
-rw-r--r--dist/Dumpvalue/t/Dumpvalue.t (renamed from lib/Dumpvalue.t)13
-rw-r--r--lib/.gitignore1
5 files changed, 21 insertions, 6 deletions
diff --git a/MANIFEST b/MANIFEST
index 084f8f152c..a6819ee602 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2707,6 +2707,8 @@ dist/Data-Dumper/t/perl-74170.t Regression test for stack reallocation
dist/Data-Dumper/t/terse.t See if Data::Dumper terse option works
dist/Devel-SelfStubber/lib/Devel/SelfStubber.pm Generate stubs for SelfLoader.pm
dist/Devel-SelfStubber/t/Devel-SelfStubber.t See if Devel::SelfStubber works
+dist/Dumpvalue/lib/Dumpvalue.pm Screen dump of perl values
+dist/Dumpvalue/t/Dumpvalue.t See if Dumpvalue works
dist/Env/lib/Env.pm Map environment into ordinary variables
dist/Env/t/array.t See if Env works for arrays
dist/Env/t/env.t See if Env works
@@ -3683,8 +3685,6 @@ lib/diagnostics.t See if diagnostics.pm works
lib/DirHandle.pm like FileHandle only for directories
lib/DirHandle.t See if DirHandle works
lib/dotsh.pl Code to "dot" in a shell script
-lib/Dumpvalue.pm Screen dump of perl values
-lib/Dumpvalue.t See if Dumpvalue works
lib/dumpvar.pl A variable dumper
lib/dumpvar.t A variable dumper tester
lib/English.pm Readable aliases for short variables
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 9685138e5c..30f4a7fb4b 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -505,6 +505,14 @@ use File::Glob qw(:case);
'UPSTREAM' => 'cpan',
},
+ 'Dumpvalue' =>
+ {
+ 'MAINTAINER' => 'p5p',
+ 'DISTRIBUTION' => 'FLORA/Dumpvalue-1.14.tar.gz',
+ 'FILES' => q[dist/Dumpvalue],
+ 'UPSTREAM' => 'blead',
+ },
+
'Encode' =>
{
'MAINTAINER' => 'dankogai',
@@ -1723,7 +1731,6 @@ use File::Glob qw(:case);
lib/DBM_Filter.pm
lib/DBM_Filter/
lib/DirHandle.{pm,t}
- lib/Dumpvalue.{pm,t}
lib/English.{pm,t}
lib/ExtUtils/Embed.pm
lib/ExtUtils/XSSymSet.pm
diff --git a/lib/Dumpvalue.pm b/dist/Dumpvalue/lib/Dumpvalue.pm
index f1ec0fbfb4..f1ec0fbfb4 100644
--- a/lib/Dumpvalue.pm
+++ b/dist/Dumpvalue/lib/Dumpvalue.pm
diff --git a/lib/Dumpvalue.t b/dist/Dumpvalue/t/Dumpvalue.t
index 6570e38a2e..e661fc51e7 100644
--- a/lib/Dumpvalue.t
+++ b/dist/Dumpvalue/t/Dumpvalue.t
@@ -1,8 +1,6 @@
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
if (ord('A') == 193) {
print "1..0 # skip: EBCDIC\n";
exit 0;
@@ -12,6 +10,12 @@ BEGIN {
print "1..0 # Skip -- Perl configured without List::Util module\n";
exit 0;
}
+
+ # `make test` in the CPAN version of this module runs us with -w, but
+ # Dumpvalue.pm relies on all sorts of things that can cause warnings. I
+ # don't think that's worth fixing, so we just turn off all warnings
+ # during testing.
+ $^W = 0;
}
use vars qw( $foo @bar %baz );
@@ -130,7 +134,10 @@ is( $out->read, '', 'unwrap ignored glob on first try');
$d->unwrap(*FOO);
is( $out->read, "*DUMPED_GLOB*\n", 'unwrap worked on glob');
$d->unwrap(qr/foo(.+)/);
-is( $out->read, "-> qr/(?^:foo(.+))/\n", 'unwrap worked on Regexp' );
+
+my $modifiers = (qr// =~ /\Q(?^/) ? '^' : '-xism';
+is( $out->read, "-> qr/(?${modifiers}:foo(.+))/\n", 'unwrap worked on Regexp' );
+
$d->unwrap( sub {} );
like( $out->read, qr/^-> &CODE/, 'unwrap worked on sub ref' );
diff --git a/lib/.gitignore b/lib/.gitignore
index 873e8a40e0..ff39f0e5dc 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -123,6 +123,7 @@
/Digest/SHA.pm
/Digest/base.pm
/Digest/file.pm
+/Dumpvalue.pm
/DynaLoader.pm
/Encode
/Encode.pm