summaryrefslogtreecommitdiff
path: root/t/comp/package.t
diff options
context:
space:
mode:
Diffstat (limited to 't/comp/package.t')
-rwxr-xr-xt/comp/package.t10
1 files changed, 6 insertions, 4 deletions
diff --git a/t/comp/package.t b/t/comp/package.t
index 5237011a62..456c0ffa4d 100755
--- a/t/comp/package.t
+++ b/t/comp/package.t
@@ -19,14 +19,16 @@ $ABC'dyick = 6;
$xyz = 2;
-$main = join(':', sort(keys _main));
-$XYZ = join(':', sort(keys _XYZ));
-$ABC = join(':', sort(keys _ABC));
+$main = join(':', sort(keys %::_main));
+$XYZ = join(':', sort(keys %::_XYZ));
+$ABC = join(':', sort(keys %::_ABC));
print $XYZ eq 'ABC:XYZ:bar:main:xyz' ? "ok 1\n" : "not ok 1 '$XYZ'\n";
-print $ABC eq 'blurfl:dyick' ? "ok 2\n" : "not ok 2\n";
+print $ABC eq 'blurfl:dyick' ? "ok 2\n" : "not ok 2 '$ABC'\n";
print $main'blurfl == 123 ? "ok 3\n" : "not ok 3\n";
+
package ABC;
+
print $blurfl == 5 ? "ok 4\n" : "not ok 4\n";
eval 'print $blurfl == 5 ? "ok 5\n" : "not ok 5\n";';
eval 'package main; print $blurfl == 123 ? "ok 6\n" : "not ok 6\n";';