In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/629e8f5e3a9b318b663e6fbb0025a6b0c03deffe?hp=52e67aba07fa1e33f37f56e48e0dd93a008ecede>
- Log ----------------------------------------------------------------- commit 629e8f5e3a9b318b663e6fbb0025a6b0c03deffe Author: Father Chrysostomos <[email protected]> Date: Tue Apr 10 21:50:03 2012 -0700 Increase $attributes::VERSION to 0.19 M ext/attributes/attributes.pm commit 46df87afe682864c981a397eb071789227e11d29 Author: Father Chrysostomos <[email protected]> Date: Tue Apr 10 21:42:29 2012 -0700 Put bulk 88âs real name in AUTHORS at his request M AUTHORS commit 62b571839b077ecb0d4bbf84a69a5652e0ea529b Author: Father Chrysostomos <[email protected]> Date: Tue Apr 10 21:41:33 2012 -0700 Revert "doco improvement for attributes.pm" This reverts commit f29a7c30d92b9e3714cce5604d86fb97c1b099e8. M ext/attributes/attributes.pm commit 915a83fef170f61282d667f6efebfd1093e261ae Author: Father Chrysostomos <[email protected]> Date: Tue Apr 10 21:40:38 2012 -0700 [perl #112352] Make âuse v5.15â always enable unicode_eval When the unicode_eval feature was added, the code for compiling an eval was modified to check whether the feature was enabled, before flagging the op. For efficiencyâs sake, since there was already a block that checked to see whether %^H was localised (which happens automatically when it is modified), and since features always used %^H, I put the check inside that block, so it would be skipped altogether without %^H set. (Itâs debatable whether it was actually any faster.) Later, in commit 6634bb9d0ed1, when I changed implicit features to use $^H, I didnât update the eval code. So it would only check to see whether the feature was enabled if %^H was also enabled. This fixes that by moving it below the %^H block. M op.c M t/lib/feature/implicit ----------------------------------------------------------------------- Summary of changes: AUTHORS | 2 +- ext/attributes/attributes.pm | 18 +----------------- op.c | 5 ++--- t/lib/feature/implicit | 9 +++++++++ 4 files changed, 13 insertions(+), 21 deletions(-) diff --git a/AUTHORS b/AUTHORS index bd979dc..0369b91 100644 --- a/AUTHORS +++ b/AUTHORS @@ -169,7 +169,6 @@ Bruce Barnett <[email protected]> Bruce J. Keeler <[email protected]> Bruce P. Schuck <[email protected]> Bud Huff <[email protected]> -bulk 88 <[email protected]> Byron Brummer <[email protected]> C Aditya <[email protected]> Calle Dybedahl <[email protected]> @@ -247,6 +246,7 @@ Dan Schmidt <[email protected]> Dan Sugalski <[email protected]> Daniel Berger <[email protected]> Daniel Chetlin <[email protected]> +Daniel Dragan <[email protected]> Daniel Frederick Crisman <[email protected]> Daniel Grisinger <[email protected]> Daniel Lieberman <[email protected]> diff --git a/ext/attributes/attributes.pm b/ext/attributes/attributes.pm index 1f6dbae..6bf10ab 100644 --- a/ext/attributes/attributes.pm +++ b/ext/attributes/attributes.pm @@ -1,6 +1,6 @@ package attributes; -our $VERSION = 0.18; +our $VERSION = 0.19; @EXPORT_OK = qw(get reftype); @EXPORT = (); @@ -325,22 +325,6 @@ declaration. In particular, this means that a subroutine reference will probably be for an undefined subroutine, even if this declaration is actually part of the definition. -It is up to this method to store the list of attributes if they will be -needed later, as well as checking for any errors. In this example there -are no error conditions, so we just store: - - my %attrs; - sub MODIFY_CODE_ATTRIBUTES { - my($package, $subref, @attrs) = @_; - $attrs{ refaddr $subref } = \@attrs; - return; - } - sub FETCH_CODE_ATTRIBUTES { - my($package, $subref) = @_; - my $attrs = $attrs{ refaddr $subref }; - return $attrs ? @$attrs : (); - } - =back Calling C<attributes::get()> from within the scope of a null package diff --git a/op.c b/op.c index c585b98..4c3d6d0 100644 --- a/op.c +++ b/op.c @@ -7581,11 +7581,10 @@ Perl_ck_eval(pTHX_ OP *o) MUTABLE_SV(hv_copy_hints_hv(GvHV(PL_hintgv)))); cUNOPo->op_first->op_sibling = hhop; o->op_private |= OPpEVAL_HAS_HH; - - if (!(o->op_private & OPpEVAL_BYTES) + } + if (!(o->op_private & OPpEVAL_BYTES) && FEATURE_UNIEVAL_IS_ENABLED) o->op_private |= OPpEVAL_UNICODE; - } return o; } diff --git a/t/lib/feature/implicit b/t/lib/feature/implicit index 1efa62b..a741421 100644 --- a/t/lib/feature/implicit +++ b/t/lib/feature/implicit @@ -113,3 +113,12 @@ print 'ss' =~ /\xdf/i ? "ok\n" : "nok\n"; EXPECT ok nok +######## +# Implicit unicode_eval feature +use v5.15; +print eval "use utf8; q|\xc5\xbf|" eq "\xc5\xbf" ? "ok\n" : "nok\n"; +use v5.8.8; +print eval "use utf8; q|\xc5\xbf|" eq "\x{17f}" ? "ok\n" : "nok\n"; +EXPECT +ok +ok -- Perl5 Master Repository
