📄 7fatal
字号:
Check FATAL functionality__END__# Check compile time warninguse warnings FATAL => 'deprecated' ;{ no warnings ; 1 if $a EQ $b ;}1 if $a EQ $b ; print STDERR "The End.\n" ;EXPECTUse of EQ is deprecated at - line 8.######### Check compile time warninguse warnings FATAL => 'all' ;{ no warnings ; 1 if $a EQ $b ;}1 if $a EQ $b ; print STDERR "The End.\n" ;EXPECTUse of EQ is deprecated at - line 8.######### Check runtime scope of pragmause warnings FATAL => 'uninitialized' ;{ no warnings ; my $b ; chop $b ;}my $b ; chop $b ;print STDERR "The End.\n" ;EXPECTUse of uninitialized value in scalar chop at - line 8.######### Check runtime scope of pragmause warnings FATAL => 'all' ;{ no warnings ; my $b ; chop $b ;}my $b ; chop $b ;print STDERR "The End.\n" ;EXPECTUse of uninitialized value in scalar chop at - line 8.######### Check runtime scope of pragmano warnings ;{ use warnings FATAL => 'uninitialized' ; $a = sub { my $b ; chop $b ; }}&$a ;print STDERR "The End.\n" ;EXPECTUse of uninitialized value in scalar chop at - line 6.######### Check runtime scope of pragmano warnings ;{ use warnings FATAL => 'all' ; $a = sub { my $b ; chop $b ; }}&$a ;print STDERR "The End.\n" ;EXPECTUse of uninitialized value in scalar chop at - line 6.########--FILE-- abc1 if $a EQ $b ;1;--FILE-- use warnings FATAL => 'deprecated' ;require "./abc";EXPECT########--FILE-- abcuse warnings FATAL => 'deprecated' ;1;--FILE-- require "./abc";1 if $a EQ $b ;EXPECT########--FILE-- abcuse warnings 'deprecated' ;1 if $a EQ $b ;1;--FILE-- use warnings FATAL => 'uninitialized' ;require "./abc";my $a ; chop $a ;print STDERR "The End.\n" ;EXPECTUse of EQ is deprecated at ./abc line 2.Use of uninitialized value in scalar chop at - line 3.########--FILE-- abc.pmuse warnings 'deprecated' ;1 if $a EQ $b ;1;--FILE-- use warnings FATAL => 'uninitialized' ;use abc;my $a ; chop $a ;print STDERR "The End.\n" ;EXPECTUse of EQ is deprecated at abc.pm line 2.Use of uninitialized value in scalar chop at - line 3.######### Check scope of pragma with evalno warnings ;eval { use warnings FATAL => 'uninitialized' ; my $b ; chop $b ;}; print STDERR "-- $@" ;my $b ; chop $b ;print STDERR "The End.\n" ;EXPECT-- Use of uninitialized value in scalar chop at - line 6.The End.######### Check scope of pragma with evaluse warnings FATAL => 'uninitialized' ;eval { my $b ; chop $b ;}; print STDERR "-- $@" ;my $b ; chop $b ;print STDERR "The End.\n" ;EXPECT-- Use of uninitialized value in scalar chop at - line 5.Use of uninitialized value in scalar chop at - line 7.######### Check scope of pragma with evaluse warnings FATAL => 'uninitialized' ;eval { no warnings ; my $b ; chop $b ;}; print STDERR $@ ;my $b ; chop $b ;print STDERR "The End.\n" ;EXPECTUse of uninitialized value in scalar chop at - line 8.######### Check scope of pragma with evalno warnings ;eval { use warnings FATAL => 'deprecated' ; 1 if $a EQ $b ;}; print STDERR "-- $@" ;1 if $a EQ $b ;print STDERR "The End.\n" ;EXPECTUse of EQ is deprecated at - line 6.######### Check scope of pragma with evaluse warnings FATAL => 'deprecated' ;eval { 1 if $a EQ $b ;}; print STDERR "-- $@" ;1 if $a EQ $b ;print STDERR "The End.\n" ;EXPECTUse of EQ is deprecated at - line 5.######### Check scope of pragma with evaluse warnings FATAL => 'deprecated' ;eval { no warnings ; 1 if $a EQ $b ;}; print STDERR $@ ;1 if $a EQ $b ;print STDERR "The End.\n" ;EXPECTUse of EQ is deprecated at - line 8.######### Check scope of pragma with evalno warnings ;eval { use warnings FATAL => 'deprecated' ;}; print STDERR $@ ;1 if $a EQ $b ;print STDERR "The End.\n" ;EXPECTThe End.######### Check scope of pragma with evalno warnings ;eval q[ use warnings FATAL => 'uninitialized' ; my $b ; chop $b ;]; print STDERR "-- $@";my $b ; chop $b ;print STDERR "The End.\n" ;EXPECT-- Use of uninitialized value in scalar chop at (eval 1) line 3.The End.######### Check scope of pragma with evaluse warnings FATAL => 'uninitialized' ;eval ' my $b ; chop $b ;'; print STDERR "-- $@" ;my $b ; chop $b ;print STDERR "The End.\n" ;EXPECT-- Use of uninitialized value in scalar chop at (eval 1) line 2.Use of uninitialized value in scalar chop at - line 7.######### Check scope of pragma with evaluse warnings FATAL => 'uninitialized' ;eval ' no warnings ; my $b ; chop $b ;'; print STDERR $@ ;my $b ; chop $b ;print STDERR "The End.\n" ;EXPECTUse of uninitialized value in scalar chop at - line 8.######### Check scope of pragma with evalno warnings ;eval q[ use warnings FATAL => 'deprecated' ; 1 if $a EQ $b ;]; print STDERR "-- $@";1 if $a EQ $b ;print STDERR "The End.\n" ;EXPECT-- Use of EQ is deprecated at (eval 1) line 3.The End.######### Check scope of pragma with evaluse warnings FATAL => 'deprecated' ;eval ' 1 if $a EQ $b ;'; print STDERR "-- $@";print STDERR "The End.\n" ;EXPECT-- Use of EQ is deprecated at (eval 1) line 2.The End.######### Check scope of pragma with evaluse warnings FATAL => 'deprecated' ;eval ' no warnings ; 1 if $a EQ $b ;'; print STDERR "-- $@";1 if $a EQ $b ;print STDERR "The End.\n" ;EXPECTUse of EQ is deprecated at - line 8.########use warnings 'void' ;time ;{ use warnings FATAL => qw(void) ; length "abc" ;}join "", 1,2,3 ;print "done\n" ;EXPECTUseless use of time in void context at - line 4.Useless use of length in void context at - line 8.########use warnings ;time ;{ use warnings FATAL => qw(void) ; length "abc" ;}join "", 1,2,3 ;print "done\n" ;EXPECTUseless use of time in void context at - line 4.Useless use of length in void context at - line 8.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -