Check interaction of $^W and lexical __END__ # Check interaction of $^W and use warnings sub fred { use warnings ; my $b ; chop $b ; } { local $^W = 0 ; fred() ; } EXPECT Use of uninitialized value in scalar chop at - line 6. ######## # Check interaction of $^W and use warnings sub fred { use warnings ; my $b ; chop $b ; } { $^W = 0 ; fred() ; } EXPECT Use of uninitialized value in scalar chop at - line 6. ######## # Check interaction of $^W and use warnings sub fred { no warnings ; my $b ; chop $b ; } { local $^W = 1 ; fred() ; } EXPECT ######## # Check interaction of $^W and use warnings sub fred { no warnings ; my $b ; chop $b ; } { $^W = 1 ; fred() ; } EXPECT ######## # Check interaction of $^W and use warnings use warnings ; $^W = 1 ; my $b ; chop $b ; EXPECT Use of uninitialized value in scalar chop at - line 6. ######## # Check interaction of $^W and use warnings $^W = 1 ; use warnings ; my $b ; chop $b ; EXPECT Use of uninitialized value in scalar chop at - line 6. ######## # Check interaction of $^W and use warnings $^W = 1 ; no warnings ; my $b ; chop $b ; EXPECT ######## # Check interaction of $^W and use warnings no warnings ; $^W = 1 ; my $b ; chop $b ; EXPECT ######## -w # Check interaction of $^W and use warnings no warnings ; my $b ; chop $b ; EXPECT ######## -w # Check interaction of $^W and use warnings use warnings ; my $b ; chop $b ; EXPECT Use of uninitialized value in scalar chop at - line 5. ######## # Check interaction of $^W and use warnings sub fred { use warnings ; my $b ; chop $b ; } BEGIN { $^W = 0 } fred() ; EXPECT Use of uninitialized value in scalar chop at - line 6. ######## # Check interaction of $^W and use warnings sub fred { no warnings ; my $b ; chop $b ; } BEGIN { $^W = 1 } fred() ; EXPECT ######## # Check interaction of $^W and use warnings use warnings ; BEGIN { $^W = 1 } my $b ; chop $b ; EXPECT Use of uninitialized value in scalar chop at - line 6. ######## # Check interaction of $^W and use warnings BEGIN { $^W = 1 } use warnings ; my $b ; chop $b ; EXPECT Use of uninitialized value in scalar chop at - line 6. ######## # Check interaction of $^W and use warnings BEGIN { $^W = 1 } no warnings ; my $b ; chop $b ; EXPECT ######## # Check interaction of $^W and use warnings no warnings ; BEGIN { $^W = 1 } my $b ; chop $b ; EXPECT ######## # Check interaction of $^W and use warnings BEGIN { $^W = 1 } { no warnings ; my $b ; chop $b ; } my $b ; chop $b ; EXPECT Use of uninitialized value in scalar chop at - line 10. ######## # Check interaction of $^W and use warnings BEGIN { $^W = 0 } { use warnings ; my $b ; chop $b ; } my $b ; chop $b ; EXPECT Use of uninitialized value in scalar chop at - line 7.