This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Change the warning for $* to add ", and will become a syntax error".
[perl5.git] / t / lib / warnings / gv
index 17ab2f0..1618e40 100644 (file)
@@ -17,7 +17,7 @@
   Mandatory Warnings ALL TODO
   ------------------
 
-    Had to create %s unexpectedly              [gv_fetchpv]
+    Had to create %SVf unexpectedly            [gv_fetchpv]
     Attempt to free unreferenced glob pointers [gp_free]
     
 __END__
@@ -43,12 +43,81 @@ EXPECT
 Use of inherited AUTOLOAD for non-method main::fred() is deprecated at - line 5.
 ########
 # gv.c
+use utf8;
+use open qw( :utf8 :std );
+sub Oᕞʀ::AUTOLOAD { 1 } sub Oᕞʀ::fᕃƌ {}
+@ISA = qw(Oᕞʀ) ;
 use warnings 'deprecated' ;
+fᕃƌ() ;
+EXPECT
+Use of inherited AUTOLOAD for non-method main::fᕃƌ() is deprecated at - line 7.
+########
+# gv.c
 $a = ${"#"};
 $a = ${"*"};
 no warnings 'deprecated' ;
 $a = ${"#"};
 $a = ${"*"};
 EXPECT
-$# is no longer supported at - line 3.
-$* is no longer supported at - line 4.
+$# is no longer supported at - line 2.
+$* is no longer supported, and will become a syntax error at - line 3.
+########
+# gv.c
+$a = ${#};
+$a = ${*};
+no warnings 'deprecated' ;
+$a = ${#};
+$a = ${*};
+EXPECT
+$# is no longer supported at - line 2.
+$* is no longer supported, and will become a syntax error at - line 3.
+########
+# gv.c
+$a = $#;
+$a = $*;
+$# = $a;
+$* = $a;
+$a = \$#;
+$a = \$*;
+no warnings 'deprecated' ;
+$a = $#;
+$a = $*;
+$# = $a;
+$* = $a;
+$a = \$#;
+$a = \$*;
+EXPECT
+$# is no longer supported at - line 2.
+$* is no longer supported, and will become a syntax error at - line 3.
+$# is no longer supported at - line 4.
+$* is no longer supported, and will become a syntax error at - line 5.
+$# is no longer supported at - line 6.
+$* is no longer supported, and will become a syntax error at - line 7.
+########
+# gv.c
+@a = @#;
+@a = @*;
+$a = $#;
+$a = $*;
+EXPECT
+$# is no longer supported at - line 4.
+$* is no longer supported, and will become a syntax error at - line 5.
+########
+# gv.c
+$a = $#;
+$a = $*;
+@a = @#;
+@a = @*;
+EXPECT
+$# is no longer supported at - line 2.
+$* is no longer supported, and will become a syntax error at - line 3.
+########
+# gv.c
+use warnings 'syntax' ;
+use utf8;
+use open qw( :utf8 :std );
+package Y;
+@ISA = qw(Fred); joe()
+EXPECT
+Can't locate package Fred for @Y::ISA at - line 6.
+Undefined subroutine &Y::joe called at - line 6.