package .....
sub handler { use strict; use diagnostics; my $r = shift; $r->print("Content-type: text/plain\n\n"); $r->print("It works"); }
Tom
Garry Heaton wrote:
Sorry, Stas, I jumped the gun editing your original. Just tested:
#!/usr/bin/perl -w use strict; use diagnostics; my $r = shift; $r->print("Content-type: text/plain\n\n"); $r->print("It works");
./test.pl produced:
Can't call method "print" on an undefined value at ./test.pl line 6 (#1) (F) You used the syntax of a method call, but the slot filled by the object reference or package name contains an undefined value. Something like this will reproduce the error:
$BADREF = undef; process $BADREF 1,2,3; $BADREF->process(1,2,3);
Uncaught exception from user code: Can't call method "print" on an undefined value at ./test.pl line 6.
Garry
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html