summaryrefslogtreecommitdiff
path: root/lib/overload.t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-04-28 00:16:25 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-05-21 21:35:12 -0700
commit3dd32f5688d5d8551d930973f2fac3251cba505d (patch)
tree979ef4983658027034a119ad12c690cf7af3fa93 /lib/overload.t
parent65c796d09e2d3d0b979004b9f972946e79196e68 (diff)
downloadperl-3dd32f5688d5d8551d930973f2fac3251cba505d.tar.gz
Test <> ovrld with glob override
While doing a PL_glob_index experiment on a branch, I almost screwed up the stack for those cases where glob is overridden and there is iterator overloading. The tests passed anyway, meaning we need more tests.
Diffstat (limited to 'lib/overload.t')
-rw-r--r--lib/overload.t5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/overload.t b/lib/overload.t
index 7657010a2a..df3a9b825d 100644
--- a/lib/overload.t
+++ b/lib/overload.t
@@ -48,7 +48,7 @@ package main;
$| = 1;
BEGIN { require './test.pl' }
-plan tests => 5053;
+plan tests => 5081;
use Scalar::Util qw(tainted);
@@ -1857,6 +1857,9 @@ foreach my $op (qw(<=> == != < <= > >=)) {
or die "open of \$iter_text gave ($!)\n";
$subs{'<>'} = '<$iter_fh>';
push @tests, [ $iter_fh, '<%s>', '(<>)', undef, [ 1, 1, 0 ], 1 ];
+ push @tests, [ $iter_fh,
+ 'local *CORE::GLOBAL::glob = sub {}; eval q|<%s>|',
+ '(<>)', undef, [ 1, 1, 0 ], 1 ];
# eval should do tie, overload on its arg before checking taint */
push @tests, [ '1;', 'eval q(eval %s); $@ =~ /Insecure/',