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
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.