Dear All
I've a bug somewhere that I cannot appear to spot..
I have writen parts of a transhandler to handle session's. It works in
once in each child and then does not appear to be executed again.
I've looked through The Guide and could not see anything there, nor in
the 'Apache modules in Perl and C'. I must be missing somehing (a clue
for a start ;-).
The obvious answer is that a variable is not being redefined /
initialised.
Any ideas appreciated.
Greg Cope
### some clues below (I hope)
I have these lines in my startup.pl:
use tinasm::Session();
$tinasm::Session::DEBUG = 1;
$tinasm::Session::DIR_MATCH = 'test';
$tinasm::Session::REDIRECT = 1;
$tinasm::Session::USE_ENV = 1;
##### end of startup.pl, snippet #####
part of the module below
##### code snippet #####
package tinasm::Session;
use strict;
use Apache;
use Apache::Constants qw(DECLINED REDIRECT OK);
use Digest::MD5 qw(md5_hex);
use constant SESSION_ID_LENGTH => 8;
use vars qw($DIR_MATCH $COOKIES_ONLY $ARGS_ONLY
$DEBUG $REDIRECT $URI_FIRST $USE_ENV);
Apache->push_handlers("PerlTransHandler", \&transhandler);
sub transhandler {
my $r = shift;
unless ($r->uri =~ m!$DIR_MATCH!o) {
print STDERR "SESSION-MANAGER-$$-URI not matched\n"
if $DEBUG;
return DECLINED;
}
print STDERR "SESSION-MANAGER-$$-URI match\n" if $DEBUG;
..... handler goes on for another 200 lines so I've snipped it - if
anyone wants to look at it drop me a line.