The fact that touching the file fixes it suggests that it's reload related. http://www.masonhq.com/?ApacheReload suggests not using reload in production if possible.
Joe Casadonte wrote: > HTML::Mason: 1.35 > Apache: 2.0.52-28 > mod_perl: 2.000004 > Linux: 2.6.9-42.0.2 > > I'm in the beginning stages of developing a new site at work and I > keep getting hit with errors like the following: > > error: Not a CODE reference at /opt/foobar/html/syshandler line 42. > context: > ... > 38: } > 39: } > 40: > 41: # print "<!-- syshandler Break #6 - UserID: [$User->{'id'}] -->\n"; > 42: $User = FooBar::User::LoadGuest() if ! exists $User->{'id'}; > 43: # print "<!-- syshandler Break #7 - UserID: [$User->{'id'}] -->\n"; > 44: > 45: #***** are we looking for a restricted page? ***** > 46: if (($m->base_comp->attr_if_exists('restricted')) && (! $User->{'id'})) > { > ... > code stack: /opt/foobar/html/syshandler:42 > > > Now, nothing has changed in FooBar::User.pm for a few days now. If I > simply touch FooBar::User.pm, the problem goes away. For a few > minutes/hours/refreshes. I'm not sure what triggers it, really. It > will happen on other modules, too. Oddly, if I SCP changes up to the > server, they are usually not recognized until I also touch the file. > It stays in this "state" even across restarts of Apache, and even if I > clear out the mason cache. > > Here's my Apache configuration: > > <IfModule !mod_perl.c> > LoadModule perl_module modules/mod_perl.so > </IfModule> > > <VirtualHost *:80> > ServerAdmin [EMAIL PROTECTED] > > ServerName baz-inftest.foobar.com > ServerAlias baz-inftest > > DocumentRoot /opt/foobar/html/ > AddDefaultCharset UTF-8 > > <Directory "/opt/foobar/html/"> > Options FollowSymLinks ExecCGI > AllowOverride None > </Directory> > > #----- load CGI here so all processes can share it ----- > PerlModule CGI > > #----- reload stuff ----- > PerlModule Apache2::Reload > PerlInitHandler Apache2::Reload > > PerlOptions -Log -Authen -Authz -Access > > #----- set some Mason variables ----- > PerlSetVar MasonDataDir /opt/foobar/mason-cache > PerlSetVar MasonCompRoot 'html => /opt/foobar/html/' > PerlAddVar MasonCompRoot 'mas => /opt/foobar/mason' > PerlSetVar MasonAllowGlobals $User > > # from: http://masonhq.com/?InstallationRecipes > PerlSetVar MasonDeclineDirs 0 > PerlSetVar MasonArgsMethod CGI > > <Perl> > use lib "/opt/foobar/lib"; > </Perl> > > #----- skip mason processing (for testing) ----- > AddType text/html .thtml > > #----- process .HTML and .MCSS files through Mason ----- > <FilesMatch "(\.html|\.mcss)$"> > SetHandler perl-script > PerlHandler HTML::Mason::ApacheHandler > </FilesMatch> > > #----- block direct access to to *.MAS and *HANDLER files ----- > <FilesMatch "(\.mas|handler)$"> > SetHandler perl-script > PerlHandler "sub { return 404; }" > </FilesMatch> > > #----- process .PL files natively ----- > <FilesMatch "(\.pl)$"> > SetHandler perl-script > PerlResponseHandler ModPerl::Registry > </FilesMatch> > > </VirtualHost> > > > > Could this be a mod_perl or Apache2::Reload issue? > > Thanks for the help! > -- > Regards, > > > joe > Joe Casadonte > [EMAIL PROTECTED] > > ------------------------------------------------------------------------------ > Llama Fresh Farms => http://www.northbound-train.com > Ramblings of a Gay Man => http://www.northbound-train.com/ramblings > Emacs Stuff => http://www.northbound-train.com/emacs.html > Music CD Trading => http://www.northbound-train.com/cdr.html > ------------------------------------------------------------------------------ > Live Free, that's the message! > ------------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Mason-users mailing list > Mason-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mason-users > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users