You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ronald J Kimball <rj...@tamias.net> on 2005/08/30 18:01:21 UTC
IO::Select->new() causes error
I'm getting the following error from a mod_perl script:
[Tue Aug 30 11:27:52 2005] [error] Can't call method "new" without a
package or object reference at
/usr/lib/perl5/site_perl/5.005/i686-linux/Net/DNS/Resolver/Base.pm line
635.
Line 635 of Base.pm is: my $sel = IO::Select->new($sock);
I've included a simple test script below, that just calls IO::Select->new()
directly and has the same problem:
[Tue Aug 30 11:57:03 2005] [error] Can't call method "new" without a
package or object reference at /www/thankyou-v1.focalex.com/htdocs/tmp.mpl
line 13.
The same code works fine on another server. It also works fine not under
mod_perl, and from the command line.
I've checked the archives, but the only suggestion I found, from several
years ago, was to upgrade to 1.24.
Both servers are running Apache/1.3.33 (Unix) mod_perl/1.29 on Linux
2.4.20-28.7smp, and perl5.005_03.
Any ideas what is causing this problem?
thanks,
Ronald
#!/usr/local/bin/perl -w
use strict;
use CGI;
use IO::Select;
use vars qw($cgi $sel);
$cgi = new CGI;
$sel = IO::Select->new();
print $cgi->header(), <<"EndOfHTML";
<html>
<body>
Ok!
</body>
</html>
EndOfHTML
__END__