in reply to using modules with 'no warnings' in perl 5.005
I would take the following approach, faking a "warnings.pm" without creating a file like that :
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 :-)eval "use warnings;"; if ($@) { eval q{ package warnings; sub import {}; sub unimport {}; }; };
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
|
---|