You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Brad Brad <br...@hotmail.com> on 2003/04/07 21:32:30 UTC

Subs randomly not found in simple module.

Hi, i've written a simple perl module but it won't work properly with 
mod_perl.  It randomly cannot find subs, things like TEST not found in 
BRAD.pm.  It works fine everytime when ran from terminal.  Can anyone help? 
:)


package BRAD;
require 5.004;
use Carp;
use strict 'vars';

sub new {
   my $self = bless { }, shift;
   %$self = @_;
   return $self;
}

sub TEST {

my @ass = {};
@ass = "\n\nTest completed\n\n";
return @ass;
}

_________________________________________________________________
Tag din Hotmail med dig, nĺr du gĺr http://www.msn.dk/mobile


Re: Subs randomly not found in simple module.

Posted by Thomas Klausner <do...@zsi.at>.
Hi!

On Mon, Apr 07, 2003 at 07:32:30PM +0000, Brad Brad wrote:
> Hi, i've written a simple perl module but it won't work properly with 
> mod_perl.  It randomly cannot find subs, things like TEST not found in 
> BRAD.pm.  It works fine everytime when ran from terminal.  Can anyone help? 

(I'm assuming mod_perl 1.x here..)

Sounds to like you are requesting from different httpd processes, some of
which work, some not.

http://perl.apache.org/docs/1.0/guide/porting.html#Sometimes_it_Works__Sometimes_it_Doesn_t

Try starting apache with the -X command line option to start in Single
Process Mode:

http://perl.apache.org/docs/general/control/control.html#Running_a_Server_in_Single_Process_Mode


-- 
#!/usr/bin/perl                               http://domm.zsi.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}