pjotrik has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks,
i just encountered a very strange Apache/modperl behavior, I'll be happy if someone can explain why things happened the way they did.
I have an Apache2 mod perl handler, somewhere deeper inside this module is used:
package SynAdmin::Response; use base 'SynAdmin'; use warnings; use strict; sub print { my ($self) = @_; $$self{r}->content_type('text/plain'); $self->tpl_proc()->process('main.tpl', $self{data}, $$self{r}) +; } 1;
As you can see, there's an error - a missing $ in $self{data}. The weird thing is, when I restarted the server to activate this changed module, Apache crashed with /usr/sbin/apachectl: line 91: 18435 Segmentation fault $HTTPD $OPTIONS -t. Usually when there's a syntax error in my code, Apache passes on the perl error message. Can anyone tell why not in this case?
Server Version: Apache/2.2.8 (Unix) DAV/2 mod_apreq2-20051231/2.6.1 mod_perl/2.0.3 Perl/v5.8.8
Any comments are appreciated!
Update: If I change the $self{data} into a simple $x, I get the Global symbol "$x" requires explicit package name I'd expect and it propagates well through.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Handler syntax error causes an apache segfault during startup
by ursus (Acolyte) on Jul 06, 2008 at 01:32 UTC | |
by pjotrik (Friar) on Jul 07, 2008 at 08:06 UTC | |
|
Re: Handler syntax error causes an apache segfault during startup
by LesleyB (Friar) on Jul 09, 2008 at 11:10 UTC |