Script doesn't work without Apache::Reload
From: Marko (meix_at_hot.ee)
Date: 06/18/04
- Previous message: Markus Mohr: "KeepCDATA => 1 in XML::DOM"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 18 Jun 2004 01:47:47 +0300
Hi,
I faced the strange problem and I didn't find any information from web.
My script gives "Can't locate object method "myMethod" via package
"Coolstuff::MyPackage" at (eval 2813)".
Strange thing is, that it works perfectly ok with PerlInitHandler
Apache::Reload in virtualhost config
and also in shell prompt. As I would like to quit using Apache::Reload after
development is over,
it just doesn't work without it.
Details below,
Any ideas?
Thanx in advance
MeiX
I have the following lines in my virtualhost config:
<Files *.pl>
PerlInitHandler Apache::Reload <= error occures when this line is
removed
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
PerlSendHeader Off
</Files>
Then i have test.pl file in web directory:
#!/usr/bin/perl
use Coolstuff::MyPackage;
my $instance=new Coolstuff::MyPackage();
$instance->myMethod();
/lots of script/
Module file:
package Coolstuff::MyPackage;
sub new {
my $module=shift;
my $self={};
bless $self, $module;
return $self;
}
/lots of methods/
sub myMethod {
my $self=shift;
return $self;
}
/lots of methods/
1;
- Previous message: Markus Mohr: "KeepCDATA => 1 in XML::DOM"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|