You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Vladislav Safronov <vl...@comptek.ru> on 2001/04/17 14:08:20 UTC

Strange mod_perl error. Help needed!

Hi,

That is all server says on
http://my.server.ru/kubok?aa=bb
and
http://my.server.ru/testmod1?

[Tue Apr 17 15:44:16 2001] [error] Undefined subroutine &main:: called.
[Tue Apr 17 15:44:18 2001] [error] Undefined subroutine &main:: called.

and that is httpd.conf
===
  PerlRequire /usr/local/www/my.server.ru/perl/Kubok.pm
  <Location /kubok>
    SetHandler  perl-script
    PerlHandler Kubok
    PerlSendHeader On
    CharsetSourceEnc windows-1251
    PerlSetupEnv On
    Options +ExecCGI
  </Location>

  <Location /testmod1>
    SetHandler  perl-script
    PerlHandler "sub { do '/home/vlads/TestMod1.pm'; print STDERR \"$!\n\";
TestMod1::handler(shift) }"
    PerlSendHeader On
    CharsetSourceEnc windows-1251
    PerlSetupEnv On
    Options +ExecCGI
  </Location>
===

Both scripts works on another mod_perl enabled server. This lame server
seems to be the same (as my sysadmin said) but the scripts does not work.
I searched conferences but I didn't find what exactly can cause such message
in server log :
[Tue Apr 17 15:44:18 2001] [error] Undefined subroutine &main:: called.

Any ideas, please?

Vlad.


RE: Strange mod_perl error. Help needed!

Posted by Vladislav Safronov <vl...@comptek.ru>.
Ok! Thanx! I found the bug :-)

> Try to install the AUTOLOAD sub and trace the calls:
> 
> use Carp;
> sub AUTOLOAD{
>     Carp::cluck("trying to load $AUTOLOAD");
> }
> 
> at least you will figure out where the sub is called from. It looks
> 
> _____________________________________________________________________
> Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
> http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
> mailto:stas@stason.org   http://apachetoday.com http://logilune.com/
> http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
> 
> 

Re: Strange mod_perl error. Help needed!

Posted by Stas Bekman <st...@stason.org>.
On Tue, 17 Apr 2001, Vladislav Safronov wrote:

> Hi,
>
> That is all server says on
> http://my.server.ru/kubok?aa=bb
> and
> http://my.server.ru/testmod1?
>
> [Tue Apr 17 15:44:16 2001] [error] Undefined subroutine &main:: called.
> [Tue Apr 17 15:44:18 2001] [error] Undefined subroutine &main:: called.
>

Try to install the AUTOLOAD sub and trace the calls:

use Carp;
sub AUTOLOAD{
    Carp::cluck("trying to load $AUTOLOAD");
}

at least you will figure out where the sub is called from. It looks

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/