{
use warnings FATAL => qw(void) ;
- length "abc" ;
+ $a = "abc";
+ length $a ;
}
join "", 1,2,3 ;
print "done\n" ;
EXPECT
Useless use of time in void context at - line 4.
-Useless use of length in void context at - line 8.
+Useless use of length in void context at - line 9.
########
# TODO ? !$Config{usethreads} && $::UTF8 && ($ENV{PERL_DESTRUCT_LEVEL} || 0) > 1 ? "Parser leaks OPs, which leak shared hash keys" : ''
{
use warnings FATAL => qw(void) ;
- length "abc" ;
+ $a = "abc";
+ length $a ;
}
join "", 1,2,3 ;
print "done\n" ;
EXPECT
Useless use of time in void context at - line 4.
-Useless use of length in void context at - line 8.
+Useless use of length in void context at - line 9.
########
use warnings FATAL => 'all';
use warnings FATAL => 'syntax', NONFATAL => 'void' ;
-length "abc";
+$a = "abc";
+length $a;
print STDERR "The End.\n" ;
EXPECT
-Useless use of length in void context at - line 4.
+Useless use of length in void context at - line 5.
The End.
########
use warnings FATAL => 'all', NONFATAL => 'void' ;
-length "abc";
+$a = "abc";
+length $a;
print STDERR "The End.\n" ;
EXPECT
-Useless use of length in void context at - line 4.
+Useless use of length in void context at - line 5.
The End.
########
use warnings FATAL => 'all', NONFATAL => 'void' ;
my $a ; chomp $a;
-length "abc";
+
+$b = "abc" ;
+length $b;
print STDERR "The End.\n" ;
EXPECT
-Useless use of length in void context at - line 5.
+Useless use of length in void context at - line 7.
Use of uninitialized value $a in scalar chomp at - line 4.
########
use warnings FATAL => 'void', NONFATAL => 'void' ;
-
-length "abc";
+$a = "abc";
+length $a;
print STDERR "The End.\n" ;
EXPECT
Useless use of length in void context at - line 4.
# TODO ? !$Config{usethreads} && $::UTF8 && ($ENV{PERL_DESTRUCT_LEVEL} || 0) > 1 ? "Parser leaks OPs, which leak shared hash keys" : ''
use warnings NONFATAL => 'void', FATAL => 'void' ;
-
-length "abc";
+$a = "abc";
+length $a;
print STDERR "The End.\n" ;
EXPECT
Useless use of length in void context at - line 4.