Plan 9 from Bell Labs’s /usr/web/sources/contrib/gabidiaz/root/sys/src/cmd/perl/t/lib/warnings/8signal

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


Check interaction of __WARN__, __DIE__ & lexical Warnings

TODO

__END__
# 8signal
BEGIN { $| = 1; $SIG{__WARN__} = sub { print "WARN -- @_" } }
BEGIN { $SIG{__DIE__}  = sub { print "DIE -- @_" } }
$a =+ 1 ;
use warnings qw(syntax) ;
$a =+ 1 ;
use warnings FATAL => qw(syntax) ;
$a =+ 1 ;
print "The End.\n" ;
EXPECT
WARN -- Reversed += operator at - line 6.
DIE -- Reversed += operator at - line 8.
Reversed += operator at - line 8.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].