BEGIN {
use CGI::Carp qw(carpout);
carpout(\*LOGGY) if open(LOGGY,'>>'.__FILE__.'.err.log');
}
####
#!/usr/bin/perl
use warnings FATAL => qw( all );
warn "hello there";
{ # line 4 (notice its in a block)
BAREWORD;
BAREWORD;
BAREWORD;
}
##
##
#!/usr/bin/perl
$SIG{__WARN__} = sub {die("warning: ",@_)};
warn "hello";
__END__
##
##
#!/usr/bin/perl
use CGI::Carp qw( fatalsToBrowser );
use Fatal qw( warn );
use strict;
use warnings;
warn "hello";
##
##
BEGIN {
use vars qw( $WARR );
$SIG{__WARN__} = sub {
$WARR .= join ' ',(@_),caller(),"\n";
};
}
warn "hello";
warn "hooyah";
die "aaah";
# ...
END {
print "Content-Type: text-html\r\n\r\n $WARR
";
}