diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2001-11-22 03:42:58 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2001-11-22 03:42:58 +0000 |
commit | 05a3f74ba61485513bfa2ba47ab199e3be30eac4 (patch) | |
tree | fe0107b35aa5f11f92206aa04d5359617ae0bed1 /t | |
parent | f93bfb42cf4e77b453ca2f92fd781c7f5fe6d446 (diff) | |
download | perl-05a3f74ba61485513bfa2ba47ab199e3be30eac4.tar.gz |
local(*CORE::GLOBAL::require) doesn't behave like other overrides
p4raw-id: //depot/perl@13187
Diffstat (limited to 't')
-rwxr-xr-x | t/op/override.t | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/t/op/override.t b/t/op/override.t index db94ed0495..590fcaa954 100755 --- a/t/op/override.t +++ b/t/op/override.t @@ -6,7 +6,7 @@ BEGIN { push @INC, '../lib'; } -print "1..10\n"; +print "1..11\n"; # # This file tries to test builtin override using CORE::GLOBAL @@ -61,3 +61,12 @@ print "ok 9\n"; eval "use 5.6"; print "not " unless $r eq "5.6"; print "ok 10\n"; + +# localizing *CORE::GLOBAL::foo should revert to finding CORE::foo +{ + local(*CORE::GLOBAL::require); + $r = ''; + eval "require NoNeXiSt;"; + print "not " if $r or $@ !~ /^Can't locate NoNeXiSt/i; + print "ok 11\n"; +} |