This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add evalbytes function
authorFather Chrysostomos <sprout@cpan.org>
Sun, 30 Oct 2011 21:33:06 +0000 (14:33 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 6 Nov 2011 08:13:48 +0000 (01:13 -0700)
commit7d7892821ccfd0b84576fc06764ec467e8ca7678
tree8a14db3fc316b83374c8d171175537ad6e6c306e
parent17e00314cad49c11dda5b621497c7010537844ea
Add evalbytes function

This function evaluates its argument as a byte string, regardless of
the internal encoding.  It croaks if the string contains characters
outside the byte range.  Hence evalbytes(" use utf8; '\xc4\x80' ")
will return "\x{100}", even if the original string had the UTF8 flag
on, and evalbytes(" '\xc4\x80' ") will return "\xc4\x80".

This has the side effect of fixing the deparsing of CORE::break under
‘use feature’ when there is an override.
19 files changed:
MANIFEST
dist/B-Deparse/Deparse.pm
dist/B-Deparse/t/core.t
dist/B-Deparse/t/deparse.t
ext/B/t/concise-xs.t
keywords.c
keywords.h
lib/feature.pm
op.c
op.h
opcode.h
pp_ctl.c
regen/keywords.pl
regen/opcodes
t/op/coreamp.t
t/op/coresubs.t
t/op/cproto.t
t/op/evalbytes.t [new file with mode: 0644]
toke.c