You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by abhishek jain <ma...@ejain.com> on 2007/01/15 13:04:17 UTC

What is the meaning of -e in the error log

 Hi,
I am running modperl 2.x and i am getting some wierd problem i am invoking
modperl from browser and at times it will execute correctly and otehr times
it will not be able to find the function called from the script. the error
log has error with -e prepended.
Here is the log:
[Mon Jan 15 17:18:32 2007] [error] [Mon Jan 15 17:18:32 2007] -e: Undefined
subroutine &Module::header called at /home/file.cgi line 138.\n

where Module.pm <http://module.pm/> has
package Module.pm <http://module.pm/>;
sub header(){
#blah blah
}
1;

and file.cgi has

#blah blah

&Module::header();


I am unable to fin thatg why is it unable to find the file at some time and
not the other times.
I am running ModPerl::RegistryPrefork
I have changed the names of Module.pm and file.cgi
Pl. help me ,
Regards,
Abhishek jain

Re: What is the meaning of -e in the error log

Posted by Perrin Harkins <pe...@elem.com>.
On Mon, 2007-01-15 at 17:34 +0530, abhishek jain wrote:

> I am running modperl 2.x and i am getting some wierd problem i am
> invoking modperl from browser and at times it will execute correctly
> and otehr times it will not be able to find the function called from
> the script. the error log has error with -e prepended. 
> Here is the log:
> [Mon Jan 15 17:18:32 2007] [error] [Mon Jan 15 17:18:32 2007] -e:
> Undefined subroutine &Module::header called at /home/file.cgi line
> 138.\n

It sounds like a variation of this:
http://perl.apache.org/docs/1.0/guide/troubleshooting.html#Undefined_subroutine__Apache__ROOT__perl__test_2epl__some_function_called_at

> where Module.pm has 
> package Module.pm;
> sub header(){

I hope you don't really have that prototype () in your sub definition.

> #blah blah
> }
> 1;
>  
> and file.cgi has 
>  
> #blah blah
>  
> &Module::header();

I suspect you've changed this code too much for us to spot the problem.
How do you load Module.pm in your real code?  Does Module.pm really
declare a package name?  Does it have the header() sub defined in the
Module.pm file, or does it source that from some other file?

- Perrin