This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix special-case recreation of *::
[perl5.git] / t / op / stash.t
index fe42700..c9634a3 100644 (file)
@@ -2,12 +2,11 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    @INC = qw(../lib);
+    require "./test.pl";
+    set_up_inc( qw(../lib) );
 }
 
-BEGIN { require "./test.pl"; }
-
-plan( tests => 54 );
+plan( tests => 55 );
 
 # Used to segfault (bug #15479)
 fresh_perl_like(
@@ -350,3 +349,10 @@ is runperl(
    ),
    "ok\n",
    "[perl #128238] non-stashes in stashes";
+
+is runperl(
+    prog => '%:: = (); print *{q|::|}, qq|\n|',
+    stderr => 1,
+   ),
+   "*main::main::\n",
+   "[perl #129869] lookup %:: by name after clearing %::";