1N/ACheck strict vars functionality
1N/A# no strict, should build & run ok.
1N/Ause strict qw(subs refs) ;
1N/A# strict vars - no error
1N/Ause vars qw( $freddy) ;
1N/ABEGIN { *freddy = \$joe::shmoe; }
1N/A# strict vars - no error
1N/Ause vars qw( $freddy) ;
1N/A# strict vars - error
1N/AGlobal symbol "$fred" requires explicit package name at - line 4.
1N/AExecution of - aborted due to compilation errors.
1N/A# strict vars - error
1N/AGlobal symbol "$fred" requires explicit package name at - line 4.
1N/AExecution of - aborted due to compilation errors.
1N/A# strict vars - error
1N/AGlobal symbol "$fred" requires explicit package name at - line 4.
1N/AExecution of - aborted due to compilation errors.
1N/A# Check compile time scope of strict vars pragma
1N/AVariable "$joe" is not imported at - line 8.
1N/AGlobal symbol "$joe" requires explicit package name at - line 8.
1N/AExecution of - aborted due to compilation errors.
1N/A# Check compile time scope of strict vars pragma
1N/AGlobal symbol "$joe" requires explicit package name at - line 6.
1N/AExecution of - aborted due to compilation errors.
1N/AVariable "$joe" is not imported at ./abc line 2.
1N/AGlobal symbol "$joe" requires explicit package name at ./abc line 2.
1N/ACompilation failed in require at - line 2.
1N/AVariable "$joe" is not imported at
abc.pm line 2.
1N/AGlobal symbol "$joe" requires explicit package name at
abc.pm line 2.
1N/ACompilation failed in require at - line 2.
1N/ABEGIN failed--compilation aborted at - line 2.
1N/A$a = 1;$f = 1;$k = 1; # just to get beyond the limit...
1N/A$b = 1;$g = 1;$l = 1;
1N/A$c = 1;$h = 1;$m = 1;
1N/A$d = 1;$i = 1;$n = 1;
1N/A$e = 1;$j = 1;$o = 1;
1N/AGlobal symbol "$f" requires explicit package name at
abc.pm line 3.
1N/AGlobal symbol "$k" requires explicit package name at
abc.pm line 3.
1N/AGlobal symbol "$g" requires explicit package name at
abc.pm line 4.
1N/AGlobal symbol "$l" requires explicit package name at
abc.pm line 4.
1N/AGlobal symbol "$c" requires explicit package name at
abc.pm line 5.
1N/AGlobal symbol "$h" requires explicit package name at
abc.pm line 5.
1N/AGlobal symbol "$m" requires explicit package name at
abc.pm line 5.
1N/AGlobal symbol "$d" requires explicit package name at
abc.pm line 6.
1N/AGlobal symbol "$i" requires explicit package name at
abc.pm line 6.
1N/AGlobal symbol "$n" requires explicit package name at
abc.pm line 6.
1N/AGlobal symbol "$e" requires explicit package name at
abc.pm line 7.
1N/AGlobal symbol "$j" requires explicit package name at
abc.pm line 7.
1N/AGlobal symbol "$o" requires explicit package name at
abc.pm line 7.
1N/AGlobal symbol "$p" requires explicit package name at
abc.pm line 8.
1N/AIllegal binary digit '2' at
abc.pm line 8, at end of line
1N/ACompilation failed in require at - line 1.
1N/ABEGIN failed--compilation aborted at - line 1.
1N/A# Check scope of pragma with eval
1N/A# Check scope of pragma with eval
1N/AGlobal symbol "$joe" requires explicit package name at - line 6.
1N/AExecution of - aborted due to compilation errors.
1N/A# Check scope of pragma with eval
1N/AGlobal symbol "$joe" requires explicit package name at - line 5.
1N/AGlobal symbol "$joe" requires explicit package name at - line 8.
1N/AExecution of - aborted due to compilation errors.
1N/A# Check scope of pragma with eval
1N/AVariable "$joe" is not imported at - line 9.
1N/AGlobal symbol "$joe" requires explicit package name at - line 9.
1N/AExecution of - aborted due to compilation errors.
1N/A# Check scope of pragma with eval
1N/A# Check scope of pragma with eval
1N/AGlobal symbol "$joe" requires explicit package name at (eval 1) line 3.
1N/A# Check scope of pragma with eval
1N/AGlobal symbol "$joe" requires explicit package name at (eval 1) line 2.
1N/A# Check scope of pragma with eval
1N/AGlobal symbol "$joe" requires explicit package name at - line 8.
1N/AExecution of - aborted due to compilation errors.
1N/A# Check if multiple evals produce same errors
1N/Amy $ret = eval q{ print $x; };
1N/Aprint "ok 1\n" unless defined $ret;
1N/A$ret = eval q{ print $x; };
1N/Aprint "ok 2\n" unless defined $ret;
1N/AGlobal symbol "$x" requires explicit package name at (eval 1) line 1.
1N/AGlobal symbol "$x" requires explicit package name at (eval 2) line 1.
1N/A# strict vars with outer our - no error
1N/A# strict vars with inner our - no error
1N/A# strict vars with outer our, inner use - no error
1N/A# strict vars with nested our - no error
1N/A# strict vars with elapsed our - error
1N/AVariable "$fred" is not imported at - line 8.
1N/AGlobal symbol "$fred" requires explicit package name at - line 8.
1N/AExecution of - aborted due to compilation errors.
1N/A# nested our with local - no error
1N/A local our $fred = 2;
1N/Aprint our $fred,"\n";
1N/A# "nailed" our declaration visibility across package boundaries
1N/A# multiple our declarations in same scope, different packages, no warning
1N/A# multiple our declarations in same scope, same package, warning
1N/A"our" variable $foo masks earlier declaration in same scope at - line 7.
1N/A# multiple our declarations in same scope, same package, warning
1N/A"our" variable $foo redeclared at - line 9.
1N/A (Did you mean "local" instead of "our"?)
1N/A# check if our variables are introduced correctly in readline()
1N/Aopen $FH, "abc" or die "Can't open 'abc': $!";
1N/A# Make sure the strict vars failure still occurs
1N/A# now that the `@i should be written as \@i' failure does not occur
1N/A# 20000522 mjd@plover.com (MJD)
1N/AGlobal symbol "@i_like_crackers" requires explicit package name at - line 7.
1N/AExecution of - aborted due to compilation errors.
1N/A# [perl #26910] hints not propagated into (?{...})
1N/AGlobal symbol "$foo" requires explicit package name at (re_eval 1) line 1.
1N/ACompilation failed in regexp at - line 3.