Trouble with script execution
Worik Stanton <[email protected]>
| Newsgroups | gmane.comp.apache.mod-perl |
|---|---|
| Message-ID | <[email protected]> |
I am having a nproblem executing my handler.
The short of it is it is when I make a change to the script I have to
restart the server to get it noticed, and it does not always call the
same code.
The lng of it:
I have a package with a 'handler' function.
It starts...
package Apache::Script;
use strict;
use Apache2::Const qw(:common);
use Apache2::Connection;
[snip]
sub handler {
warn "Apache::Script::handler $$ '".join(", ", @_)."'";
my $r = shift;
[snip]
Many more lines like...
warn "Apache::Script::handler";
And in the config file:
<Location /Script>
SetHandler perl-script
PerlResponseHandler Apache::Script
</Location>
Repeatedly loading the URL I get different results almost every time.
With the first 'warn' statement producing oyutput almst every iteration
and occasionally the later warn statements not being executed, and often
with no output.
Making changes t the script (adding debugging 'warn' statements) are
only reliably (ish) noticed if I restart the server. There is some
unreliability in my code (bugs) I am trying to track down but it is
confounded by the fact I am not sure what mod_perl is doing.
There seems to be a time element. After restarting the server
everything goes well for a while (minutes) but soon behaviour changes
and I am back to only some of the code executing (with no oither changes
but the passing of time).
I thought mod_perl would reload code that changed. Is this wrong?
Worik
--
The only true evil is turning people into things....
Granny Weatherwax
[email protected] 021-1680650, (03) 4821804
Aotearoa (New Zealand)
signature.asc
(application/pgp-signature, 538 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTeTa/AAoJEDgltBsVWtVcIeYIAJTTTCObkN5q0V8ltu91r1Td uYkX1pIHODTGAMkzgBzYc1iT8hndo4ciXx19354HnLfNva3oryqKFq584pzWqDcN IMtsFQvoOihh01/R9XTObk9BmCF7rdzk2KA4WN+W5hUEw57X1VWvTXZFFd7tFEkF 50QWXl4l6hknkARiU0Jca8f/ujnf/yZSLnROcnVF2WRkoGmf3Zo7jcRXUrVJ82lG /A8YHuvy/Jy/LCFUtg9OhoFH5VqCzI8qHvIHxXX8gYWK7TfVKclYDqB+ydq4yC11 nRdLZMqmVM3/nINKFMRXSHbhGR1Ud1V9Ftk2uvfW+2TJ3ZZwcXY8BAes18upHg0= =D/UK -----END PGP SIGNATURE-----