if ($_[0] =~ /readline\(\) on unopened filehandle (\S+)/ ||
$_[0] =~ /Read on (?:unopened|closed) filehandle <(\S+)>/
) {
Way cool!
------ We are the carpenters and bricklayers of the Information Age. Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement. | [reply] [d/l] |
use HTML;
print <aol>, "that's sick! :)", </aol>;
| [reply] [d/l] |
Agreed, sick sick SICK!!
...I love it.
| [reply] |
You're already being really evil by writing this (or using it!), so what's a bit of anti-social coding?
package HTML;
#force warnings on, in case user "forgot" to... :)
$^W++;
# rest exactly as japhy wrote it
--
Mike | [reply] [d/l] |
| [reply] |
this has an interesting side effect, such as evidenced in this one-liner:
perl -MHTML -e 'use warnings;use CGI qw/:cgi/; my $cgi = new CGI; print $cgi->header(-type => "text/html"),<html>,<head>,<title>,"Yuck",</title>,</head>,<body>,<tt>,"hello world",</tt>,</body>,</html>, "\n";'
in order to get this to work as it should, i'm forced to make two separate print calls.
whether this (bug|feature) makes this module more or less evil is best left to your discretion. (:
strfry() | [reply] [d/l] |
Move the $SIG{__WARN__} setting into import and have a
sub unimport { delete $SIG{__WARN__} }
(untested) | [reply] |