xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/t/lib/warnings/8signal (revision 0:68f95e015346)
1*0Sstevel@tonic-gateCheck interaction of __WARN__, __DIE__ & lexical Warnings
2*0Sstevel@tonic-gate
3*0Sstevel@tonic-gateTODO
4*0Sstevel@tonic-gate
5*0Sstevel@tonic-gate__END__
6*0Sstevel@tonic-gate# 8signal
7*0Sstevel@tonic-gateBEGIN { $| = 1; $SIG{__WARN__} = sub { print "WARN -- @_" } }
8*0Sstevel@tonic-gateBEGIN { $SIG{__DIE__}  = sub { print "DIE -- @_" } }
9*0Sstevel@tonic-gate$a =+ 1 ;
10*0Sstevel@tonic-gateuse warnings qw(syntax) ;
11*0Sstevel@tonic-gate$a =+ 1 ;
12*0Sstevel@tonic-gateuse warnings FATAL => qw(syntax) ;
13*0Sstevel@tonic-gate$a =+ 1 ;
14*0Sstevel@tonic-gateprint "The End.\n" ;
15*0Sstevel@tonic-gateEXPECT
16*0Sstevel@tonic-gateWARN -- Reversed += operator at - line 6.
17*0Sstevel@tonic-gateDIE -- Reversed += operator at - line 8.
18*0Sstevel@tonic-gateReversed += operator at - line 8.
19