diff options
author | Tony Cook <tony@develop-help.com> | 2015-03-02 17:03:12 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2015-03-02 17:03:35 +1100 |
commit | b6bba886965111a01650def18e0b8bf4d7be34ae (patch) | |
tree | c85ec54b4e65da844e3e3570501882fc9defc166 /lib/B | |
parent | 813d2eb17164751c312a69e7c7c56dc71aad1ff1 (diff) | |
download | perl-b6bba886965111a01650def18e0b8bf4d7be34ae.tar.gz |
[perl #123947] deparse $#_ as $#_ not as $#{_}
8c2e27d changed B::Deparse to deparse $#{1} as that instead of as $#1
which is a syntax error, but also changed $#_ to deparse as $#{_}
which isn't necessary, and broke GFUJI/macro-0.06.tar.gz
This could be considered a bug in macro.pm, but since we don't need to
deparse $#_ as $#{_} let's not do that.
Diffstat (limited to 'lib/B')
-rw-r--r-- | lib/B/Deparse.pm | 4 | ||||
-rw-r--r-- | lib/B/Deparse.t | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm index c998989f24..15a1527ba2 100644 --- a/lib/B/Deparse.pm +++ b/lib/B/Deparse.pm @@ -46,7 +46,7 @@ use B qw(class main_root main_start main_cv svref_2object opnumber perlstring MDEREF_SHIFT ); -$VERSION = '1.33'; +$VERSION = '1.34'; use strict; use vars qw/$AUTOLOAD/; use warnings (); @@ -1724,7 +1724,7 @@ sub stash_variable { return "$prefix$name"; } - if ($name =~ /^[^[:alpha:]+-]$/) { + if ($name =~ /^[^[:alpha:]_+-]$/) { if (defined $cx && $cx == 26) { if ($prefix eq '@') { return "$prefix\{$name}"; diff --git a/lib/B/Deparse.t b/lib/B/Deparse.t index f536284e28..9805bdee93 100644 --- a/lib/B/Deparse.t +++ b/lib/B/Deparse.t @@ -1534,7 +1534,7 @@ my @x; @x = ($#{`}, $#{~}, $#{!}, $#{@}, $#{$}, $#{%}, $#{^}, $#{&}, $#{*}); @x = ($#{(}, $#{)}, $#{[}, $#{{}, $#{]}, $#{}}, $#{'}, $#{"}, $#{,}); @x = ($#{<}, $#{.}, $#{>}, $#{/}, $#{?}, $#{=}, $#+, $#{\}, $#{|}, $#-); -@x = ($#{;}, $#{:}, $#{1}); +@x = ($#{;}, $#{:}, $#{1}), $#_; #### # ${#} interpolated # It's a known TODO that warnings are deparsed as bits, not textually. |