develooper Front page | perl.perl5.changes | Postings from October 2019

[perl.git] branch blead updated. v5.31.4-355-g67eb585123

From:
James Keenan via perl5-changes
Date:
October 12, 2019 17:26
Subject:
[perl.git] branch blead updated. v5.31.4-355-g67eb585123
Message ID:
E1iJL9C-0003g6-LD@git.dc.perl.space
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/67eb585123f82c50117f74fd12bf748a659b41e8?hp=d74b131b0ba952f0c894f2462279e1dc12f94d82>

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 dist/Dumpvalue/lib/Dumpvalue.pm | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/dist/Dumpvalue/lib/Dumpvalue.pm b/dist/Dumpvalue/lib/Dumpvalue.pm
index 3faf829538..0bec4cb3e9 100644
--- a/dist/Dumpvalue/lib/Dumpvalue.pm
+++ b/dist/Dumpvalue/lib/Dumpvalue.pm
@@ -1,7 +1,8 @@
 use 5.006_001;			# for (defined ref) and $#$v and our
 package Dumpvalue;
 use strict;
-our $VERSION = '1.19';
+use warnings;
+our $VERSION = '1.20';
 our(%address, $stab, @stab, %stab, %subs);
 
 sub ASCII { return ord('A') == 65; }
@@ -101,6 +102,7 @@ sub stringify {
   my $tick = $self->{tick};
 
   return 'undef' unless defined $_ or not $self->{printUndef};
+  $_ = '' if not defined $_;
   return $_ . "" if ref \$_ eq 'GLOB';
   { no strict 'refs';
     $_ = &{'overload::StrVal'}($_)
@@ -176,7 +178,7 @@ sub unwrap {
   my $self = shift;
   return if $DB::signal and $self->{stopDbSignal};
   my ($v) = shift ;
-  my ($s) = shift ;		# extra no of spaces
+  my ($s) = shift || 0;		# extra no of spaces
   my $sp;
   my (%v,@v,$address,$short,$fileno);
 
@@ -390,6 +392,7 @@ sub CvGV_name {
 sub dumpsub {
   my $self = shift;
   my ($off,$sub) = @_;
+  $off ||= 0;
   my $ini = $sub;
   my $s;
   $sub = $1 if $sub =~ /^\{\*(.*)\}$/;
@@ -419,17 +422,17 @@ sub dumpvars {
   my $self = shift;
   my ($package,@vars) = @_;
   local(%address,$^W);
-  my ($key,$val);
   $package .= "::" unless $package =~ /::$/;
   *stab = *main::;
 
   while ($package =~ /(\w+?::)/g) {
-    *stab = $ {stab}{$1};
+    *stab = defined ${stab}{$1} ? ${stab}{$1} : '';
   }
   $self->{TotalStrings} = 0;
   $self->{Strings} = 0;
   $self->{CompleteTotal} = 0;
-  while (($key,$val) = each(%stab)) {
+  for my $k (keys %stab) {
+    my ($key,$val) = ($k, $stab{$k});
     return if $DB::signal and $self->{stopDbSignal};
     next if @vars && !grep( matchvar($key, $_), @vars );
     if ($self->{usageOnly}) {

-- 
Perl5 Master Repository



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About