I would take the following approach, faking a "warnings.pm" without creating a file like that :
eval "use warnings;";
if ($@) {
eval q{
package warnings;
sub import {};
sub unimport {};
};
};
You could try to also do some funky stuff with
$^W, but as
warnings is a lexical pragma, it's best not to go there :-)
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The
$d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider
($c = $d->accept())->get_request(); $c->send_response( new #in the
HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web