use strict; use warnings; # Customize Warning messages. BEGIN { $SIG{'__WARN__'} = sub { warn localtime . ': ' . $_[0] }; $SIG{'__DIE__'} = sub { die localtime . ': ' . $_[0] }; } my $foo = 10; my $foo = 20; # warning about duplicate my $foo, die "Goodbye world";
In reply to Re: error/warn customization
by wind
in thread error/warn customization
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |