diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-02-28 17:32:08 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2012-03-13 17:07:59 +0100 |
commit | c2357b5c6baff9eb71fd8560bf76082546b1555c (patch) | |
tree | 7183ed7720c575a511eb23395609aef02e0cf391 | |
parent | 80860c87a1a1ca49bc1ba580b15be83c27e660fe (diff) | |
download | perl-smoke-me/Deparse-defeature.tar.gz |
Fix regression in deparsing say (etc) under use 5.10.0smoke-me/Deparse-defeature
Commit 6634bb9d0ed117be introduced a regression, causing this
use 5.10.0;
say "Perl rules";
to be deparsed as C<CORE::say>, not C<say>, etc. It wasn't actually possible
to write tests for this within the t/deparse.t framework until the recent
refactoring.
-rw-r--r-- | dist/B-Deparse/Deparse.pm | 4 | ||||
-rw-r--r-- | dist/B-Deparse/t/deparse.t | 6 |
2 files changed, 2 insertions, 8 deletions
diff --git a/dist/B-Deparse/Deparse.pm b/dist/B-Deparse/Deparse.pm index 054b919e38..de768d9a7c 100644 --- a/dist/B-Deparse/Deparse.pm +++ b/dist/B-Deparse/Deparse.pm @@ -20,7 +20,7 @@ use B qw(class main_root main_start main_cv svref_2object opnumber perlstring CVf_METHOD CVf_LVALUE PMf_KEEP PMf_GLOBAL PMf_CONTINUE PMf_EVAL PMf_ONCE PMf_MULTILINE PMf_SINGLELINE PMf_FOLD PMf_EXTENDED); -$VERSION = "1.12"; +$VERSION = '1.13'; use strict; use vars qw/$AUTOLOAD/; use warnings (); @@ -1689,7 +1689,7 @@ sub keyword { local $^H = $self->{hints}; # Shh! Keep quite about this function. It is not to be # relied upon. - $hh = { map +($_ => 1), feature::current_bundle() }; + $hh = { map +($feature::feature{$_} => 1), @{feature::current_bundle()} }; } elsif ($hints) { $hh = $self->{'hinthash'} } return "CORE::$name" diff --git a/dist/B-Deparse/t/deparse.t b/dist/B-Deparse/t/deparse.t index 1861fd2486..0fa3cbf315 100644 --- a/dist/B-Deparse/t/deparse.t +++ b/dist/B-Deparse/t/deparse.t @@ -458,13 +458,11 @@ foo { @bar } 1 xor foo(); say 'foo'; #### # SKIP ?$] < 5.010 && "say not implemented on this Perl version" -# TODO B::Deparse outputs CORE::say # CONTEXT use 5.10.0; # say in the context of use 5.10.0 say 'foo'; #### # SKIP ?$] < 5.010 && "say not implemented on this Perl version" -# TODO B::Deparse outputs CORE::say # say with use 5.10.0 use 5.10.0; say 'foo'; @@ -482,7 +480,6 @@ use feature 'say', 'state', 'switch'; say 'foo'; #### # SKIP ?$] < 5.010 && "say not implemented on this Perl version" -# TODO B::Deparse outputs CORE::say # CONTEXT use feature ':5.10'; # say with use 5.10.0 in the context of use feature use 5.10.0; @@ -506,13 +503,11 @@ say 'foo'; __SUB__; #### # SKIP ?$] < 5.015 && "__SUB__ not implemented on this Perl version" -# TODO B::Deparse outputs CORE::__SUB__ # CONTEXT use 5.15.0; # __SUB__ in the context of use 5.15.0 __SUB__; #### # SKIP ?$] < 5.015 && "__SUB__ not implemented on this Perl version" -# TODO B::Deparse outputs CORE::__SUB__ # __SUB__ with use 5.15.0 use 5.15.0; __SUB__; @@ -530,7 +525,6 @@ use feature 'current_sub', 'evalbytes', 'fc', 'say', 'state', 'switch', 'unicode __SUB__; #### # SKIP ?$] < 5.015 && "__SUB__ not implemented on this Perl version" -# TODO B::Deparse outputs CORE::__SUB__ # CONTEXT use feature ':5.15'; # __SUB__ with use 5.15.0 in the context of use feature use 5.15.0; |