This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Dual-life Dumpvalue
authorFlorian Ragwitz <rafl@debian.org>
Wed, 15 Dec 2010 00:00:30 +0000 (01:00 +0100)
committerFlorian Ragwitz <rafl@debian.org>
Wed, 15 Dec 2010 00:14:17 +0000 (01:14 +0100)
MANIFEST
Porting/Maintainers.pl
dist/Dumpvalue/lib/Dumpvalue.pm [moved from lib/Dumpvalue.pm with 100% similarity]
dist/Dumpvalue/t/Dumpvalue.t [moved from lib/Dumpvalue.t with 96% similarity]
lib/.gitignore

index 084f8f1..a6819ee 100644 (file)
--- 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
index 9685138..30f4a7f 100755 (executable)
@@ -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
similarity index 96%
rename from lib/Dumpvalue.t
rename to dist/Dumpvalue/t/Dumpvalue.t
index 6570e38..e661fc5 100644 (file)
@@ -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' );
 
index 873e8a4..ff39f0e 100644 (file)
 /Digest/SHA.pm
 /Digest/base.pm
 /Digest/file.pm
+/Dumpvalue.pm
 /DynaLoader.pm
 /Encode
 /Encode.pm