From: Perl 5 Porters Date: Fri, 5 Jul 1996 05:30:30 +0000 (+0000) Subject: perl 5.003_01: lib/dumpvar.pl X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b2391ea85a67736925638578f361d4f8a433ac07;p=p5sagit%2Fp5-mst-13.2.git perl 5.003_01: lib/dumpvar.pl Turn off optional warnings Eliminate $' to avoid runtime penalty --- diff --git a/lib/dumpvar.pl b/lib/dumpvar.pl index 06c0930..1fa8246 100644 --- a/lib/dumpvar.pl +++ b/lib/dumpvar.pl @@ -25,6 +25,7 @@ $subdump = 1; sub main::dumpValue { local %address; + local $^W=0; (print "undef\n"), return unless defined $_[0]; (print &stringify($_[0]), "\n"), return unless ref $_[0]; dumpvar::unwrap($_[0],0); @@ -222,8 +223,8 @@ sub unwrap { sub matchvar { $_[0] eq $_[1] or - ($_[1] =~ /^([!~])(.)/) and - ($1 eq '!') ^ (eval {($_[2] . "::" . $_[0]) =~ /$2$'/}); + ($_[1] =~ /^([!~])(.)([\x00-\xff]*)/) and + ($1 eq '!') ^ (eval {($_[2] . "::" . $_[0]) =~ /$2$3/}); } sub compactDump { @@ -319,7 +320,7 @@ sub findsubs { sub main::dumpvar { my ($package,@vars) = @_; - local(%address,$key,$val); + local(%address,$key,$val,$^W); $package .= "::" unless $package =~ /::$/; *stab = *{"main::"}; while ($package =~ /(\w+?::)/g){