X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Fmydef.t;h=f250ff6e367951cba082c99717d4739f29665aa0;hb=584420f022db57225e9644b9c6668ff9f567984a;hp=485f8431a56b83a3a99435d32f01fb5c32b72af6;hpb=7cc47870397ebff757d126816a8d225e8c7f5e20;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/mydef.t b/t/op/mydef.t index 485f843..f250ff6 100644 --- a/t/op/mydef.t +++ b/t/op/mydef.t @@ -1,11 +1,11 @@ -#!./perl -w +#!./perl BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } -print "1..66\n"; +print "1..70\n"; my $test = 0; sub ok ($$) { @@ -164,7 +164,7 @@ $_ = "global"; { my $_ = "abc"; my $x = reverse; - ok( $x eq "cba", 'reverse without arguments picks up $_ # TODO' ); + ok( $x eq "cba", 'reverse without arguments picks up $_' ); } { @@ -189,3 +189,12 @@ END { unlink $file; } ok( $x eq "hello\n", 'reading from <$_> works' ); close $_; } + +{ + $fqdb::_ = 'fqdb'; + ok( $fqdb::_ eq 'fqdb', 'fully qualified $_ is not in main' ); + ok( eval q/$fqdb::_/ eq 'fqdb', 'fully qualified, evaled $_ is not in main' ); + package fqdb; + ::ok( $_ ne 'fqdb', 'unqualified $_ is in main' ); + ::ok( q/$_/ ne 'fqdb', 'unqualified, evaled $_ is in main' ); +}