diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2001-11-19 14:26:45 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-19 14:09:34 +0000 |
commit | a801c63c4c283fdf8af1d9fbd7d3d89096ee73f6 (patch) | |
tree | c124764c6ddf3ba2f477431fccf785bcbb723b15 /t | |
parent | a16a9fa3134789d190f80e1f78e4ef69ba73acca (diff) | |
download | perl-a801c63c4c283fdf8af1d9fbd7d3d89096ee73f6.tar.gz |
new warning "Useless use of sort in scalar context"
Message-ID: <20011119132645.A15034@rafael>
p4raw-id: //depot/perl@13094
Diffstat (limited to 't')
-rw-r--r-- | t/lib/warnings/op | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/lib/warnings/op b/t/lib/warnings/op index ab6d773c1f..2fa54b8262 100644 --- a/t/lib/warnings/op +++ b/t/lib/warnings/op @@ -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/ ; @@ -332,6 +335,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 |