diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-05-21 10:18:26 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-05-21 10:18:51 -0700 |
commit | bdabb2d5e95e614c681c9c1c6a410f5f0096a4f8 (patch) | |
tree | 1a534bd9f34e04b28a98828fc789c43434eeae27 /dist/B-Deparse | |
parent | 8f1da26d544e0a10ac9cc91249e2e6e57e1847f6 (diff) | |
download | perl-bdabb2d5e95e614c681c9c1c6a410f5f0096a4f8.tar.gz |
Test require override with Deparse [perl #62500]
Diffstat (limited to 'dist/B-Deparse')
-rw-r--r-- | dist/B-Deparse/t/deparse.t | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/dist/B-Deparse/t/deparse.t b/dist/B-Deparse/t/deparse.t index 802c31f4df..5ea240a74b 100644 --- a/dist/B-Deparse/t/deparse.t +++ b/dist/B-Deparse/t/deparse.t @@ -183,6 +183,19 @@ EOCODE is $deparsed, $code, 'our $funny_Unicode_chars'; } +# [perl #62500] +$a = + `$^X $path "-MO=Deparse" -e "BEGIN{*CORE::GLOBAL::require=sub{1}}" 2>&1`; +$a =~ s/-e syntax OK\n//g; +is($a, <<'EOCODF', "CORE::GLOBAL::require override causing panick"); +sub BEGIN { + *CORE::GLOBAL::require = sub { + 1; + } + ; +} +EOCODF + done_testing(); __DATA__ |