warning for split(/.../g, ...);
[p5sagit/p5-mst-13.2.git] / t / lib / warnings / op
index 0079146..7833562 100644 (file)
@@ -36,6 +36,9 @@
        $a ;
        "abc"
 
+     Useless use of sort in scalar context
+       my $x = sort (2,1,3);
+
      Applying %s to %s will act on scalar(%s)
        my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;
        @a =~ /abc/ ;
     %s() called too early to check prototype           [Perl_peep]
         fred() ; sub fred ($$) {}
 
-     Non-octal literal mode (%d) specified
-       (Did you mean 0%d instead?)
-       chmod 777, "foo";
-       mkdir "foo", 777;
-       umask 222;
+
+     Use of "package" with no arguments is deprecated
+       package;
+
+    Package `%s' not found (did you use the incorrect case?)
+
+    Use of /g modifier is meaningless in split
 
     Mandatory Warnings 
     ------------------
@@ -332,6 +337,14 @@ Useless use of getpwnam in void context at - line 52.
 Useless use of getpwuid in void context at - line 53.
 ########
 # op.c
+use warnings 'void' ; close STDIN ;
+my $x = sort (2,1,3);
+no warnings 'void' ;
+$x = sort (2,1,3);
+EXPECT
+Useless use of sort in scalar context at - line 3.
+########
+# op.c
 no warnings 'void' ; close STDIN ;
 1 x 3 ;                        # OP_REPEAT
                        # OP_GVSV
@@ -933,28 +946,20 @@ Useless use of push with no values at - line 4.
 Useless use of unshift with no values at - line 5.
 ########
 # op.c
-use warnings 'chmod' ;
-chmod 777;
-no warnings 'chmod' ;
-chmod 777;
-EXPECT
-Non-octal literal mode (777) specified at - line 3.
-       (Did you mean 0777 instead?)
-########
-# op.c
-use warnings 'umask' ;
-umask 222;
-no warnings 'umask' ;
-umask 222;
+use warnings 'deprecated' ;
+package;
+no warnings 'deprecated' ;
+package;
 EXPECT
-Non-octal literal mode (222) specified at - line 3.
-       (Did you mean 0222 instead?)
+Use of "package" with no arguments is deprecated at - line 3.
+Global symbol "BEGIN" requires explicit package name at - line 4.
+BEGIN not safe after errors--compilation aborted at - line 4.
 ########
 # op.c
-use warnings 'mkdir' ;
-mkdir "", 777;
-no warnings 'mkdir' ;
-mkdir "", 777;
+# 20020401 mjd@plover.com at suggestion of jfriedl@yahoo.com
+use warnings 'regexp';
+split /blah/g, "blah";
+no warnings 'regexp';
+split /blah/g, "blah";
 EXPECT
-Non-octal literal mode (777) specified at - line 3.
-       (Did you mean 0777 instead?)
+Use of /g modifier is meaningless in split at - line 4.