diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-01-18 23:15:36 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-01-18 23:15:36 +0100 |
commit | 21b521587093ec1c2a5c9d95eb360a923a70e57f (patch) | |
tree | e3f86f5c14948f43da026d03e1626102b8f342ef | |
parent | deb20ba30561f9f787c79f9c746b4043eef6822b (diff) | |
download | perl-21b521587093ec1c2a5c9d95eb360a923a70e57f.tar.gz |
Make B::Deparse handle the _ prototype
This notably fixes:
[perl #62484] B::Deparse hangs on called subs with $;_ prototype
-rw-r--r-- | ext/B/B/Deparse.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index c398ddb309..1407b38e5a 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -3230,7 +3230,7 @@ sub check_proto { # An unbackslashed @ or % gobbles up the rest of the args 1 while $proto =~ s/(?<!\\)([@%])[^\]]+$/$1/; while ($proto) { - $proto =~ s/^(\\?[\$\@&%*]|\\\[[\$\@&%*]+\]|;)//; + $proto =~ s/^(\\?[\$\@&%*_]|\\\[[\$\@&%*]+\]|;)//; my $chr = $1; if ($chr eq "") { return "&" if @args; @@ -3242,7 +3242,7 @@ sub check_proto { } else { $arg = shift @args; last unless $arg; - if ($chr eq "\$") { + if ($chr eq "\$" || $chr eq "_") { if (want_scalar $arg) { push @reals, $self->deparse($arg, 6); } else { |