exotic_names.t (perl-5.32.0-RC0.tar.xz) | : | exotic_names.t (perl-5.32.0-RC1.tar.xz) | ||
---|---|---|---|---|
skipping to change at line 16 | skipping to change at line 16 | |||
BEGIN { $^P |= 0x210 } | BEGIN { $^P |= 0x210 } | |||
# This is a mess. The stash can supposedly handle Unicode but the behavior | # This is a mess. The stash can supposedly handle Unicode but the behavior | |||
# is literally undefined before 5.16 (with crashes beyond the basic plane), | # is literally undefined before 5.16 (with crashes beyond the basic plane), | |||
# and remains unclear past 5.16 with evalbytes and feature unicode_eval | # and remains unclear past 5.16 with evalbytes and feature unicode_eval | |||
# In any case - Sub::Name needs to *somehow* work with this, so we will do | # In any case - Sub::Name needs to *somehow* work with this, so we will do | |||
# a heuristic with ambiguous eval and looking for octets in the stash | # a heuristic with ambiguous eval and looking for octets in the stash | |||
use if $] >= 5.016, feature => 'unicode_eval'; | use if $] >= 5.016, feature => 'unicode_eval'; | |||
if ($] >= 5.008) { | if ($] >= 5.008) { | |||
my $builder = Test::More->builder; | my $builder = Test::More->builder; | |||
binmode $builder->output, ":encoding(utf8)"; | binmode $builder->output, ":encoding(utf8)"; | |||
binmode $builder->failure_output, ":encoding(utf8)"; | binmode $builder->failure_output, ":encoding(utf8)"; | |||
binmode $builder->todo_output, ":encoding(utf8)"; | binmode $builder->todo_output, ":encoding(utf8)"; | |||
} | } | |||
sub compile_named_sub { | sub compile_named_sub { | |||
my ( $fullname, $body ) = @_; | my ( $fullname, $body ) = @_; | |||
my $sub = eval "sub $fullname { $body }" . '\\&{$fullname}'; | my $sub = eval "sub $fullname { $body }" . '\\&{$fullname}'; | |||
return $sub if $sub; | return $sub if $sub; | |||
my $e = $@; | my $e = $@; | |||
require Carp; | require Carp; | |||
Carp::croak $e; | Carp::croak $e; | |||
} | } | |||
End of changes. 1 change blocks. | ||||
4 lines changed or deleted | 4 lines changed or added |