This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [perl #33173] shellwords.pl and tainting
[perl5.git] / lib / dumpvar.pl
index 5c9100b..474818a 100644 (file)
@@ -30,7 +30,8 @@ sub main::dumpValue {
   local $^W=0;
   (print "undef\n"), return unless defined $_[0];
   (print &stringify($_[0]), "\n"), return unless ref $_[0];
-  dumpvar::unwrap($_[0],0, $_[1]);
+  push @_, -1 if @_ == 1;
+  dumpvar::unwrap($_[0], 0, $_[1]);
 }
 
 # This one is good for variable names: