[Omaha.pm] Intermittent Perl error...

Sterling Hanenkamp sterling at hanenkamp.com
Fri Oct 29 13:53:51 PDT 2010


Do any of the subs do some sort of conditional import into main or muck with
the symbol table?

For example:

use 5.12.1;
sub foo { say 'test' }

if (rand > 0.5) {
    undef *{foo};
}

foo();

50% of the time will print "test" and the other 50% will print:

Undefined subroutine &main::foo called at test.pl line 8.

On Fri, Oct 29, 2010 at 11:47 AM, Jay Hannah <jhannah at mutationgrid.com>wrote:

> On Oct 29, 2010, at 10:11 AM, Dan Linder wrote:
> > Status: 500 Content-type: text/html
> > Software error:
> > Undefined subroutine &main::MySubroutine called at MyCGI.cgi line 123
> >
> > I'm asking my server admin to send me the Apache log files (it's a remote
> server I don't have access to) - is there anything else to look at?
>
> Is it vanilla CGI (perl is executed for every page hit)? mod_perl? fastcgi?
> other?
>
> I'd write a little WWW::Mechanize program to hit it 1000 times and see how
> many times the error occurs. If you think it's load related somehow (really?
> eek) then you could use Apache Benchmark (ab) to nail the heck out of it and
> see if load does indeed cause a problem.
>
> Do you have another server with the same software to compare results?
>
> HTH,
>
> Jay Hannah
> Software Architect
> jhannah at mutationgrid.com | http://mutationgrid.com | 1-402-598-7782
>
>
>
>
>
> _______________________________________________
> Omaha-pm mailing list
> Omaha-pm at pm.org
> http://mail.pm.org/mailman/listinfo/omaha-pm
>



-- 
Andrew Sterling Hanenkamp
sterling at hanenkamp.com
785.370.4454
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/omaha-pm/attachments/20101029/d572655e/attachment.html>


More information about the Omaha-pm mailing list