You're using Apache::Session and sometimes the data doesn't stay saved when you think it should (like mentioned in Re: State-keeping modules). Chances are it's a closure that is to blame.
Just add the DESTROY method to your derived class and it will spew a warning anytime it detects this happening. (YMMV of course.)
package Apache::Session::Derived::Class; use strict; our $VERSION = '1.00'; our @ISA = qw(Apache::Session); use Apache::Session; ... sub populate { my $self = shift; ... return $self; } sub DESTROY { my $self = shift; local $@; eval { $self->save; }; if ( $@ ) { my $error = $@; my $msg = q{Can't call method ".*?" on an undefined value at } . q{.*?/Apache/Session\.pm line \d+ during global destruct +ion.}; if ( $error =~ m/$msg/ ) { warn "Unable to save session changes! (Closure around sessio +n?)\n"; } else { warn $error; } } $self->release_all_locks; } 1;
I would like to thank diotalevi for pointing out the need for localizing $@.
In reply to (Apache::Session) Detect a Failure to Save Session by Mr. Muskrat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |