Hi all,
I found that if I explicitly undef %session, CLEAR will be triggered
before DESTROY clearing $self->{data}, so $self->save actually update
nothing in the database:
# Apache::Session
...
sub CLEAR {
warn "CLEAR!\n";
...
sub DESTROY {
warn "DESTROY!\n";
...
# The script
...
tie %session, 'Apache::Session::Oracle', undef, {
...,
Commit => 1,
},
$session{array_ref} = [ 1..10 ];
print "Storing session to database\n";
undef %session; # Clears $self->{data}
Gives,
bash$ perl test.pl
Storing session to database
CLEAR!
DESTROY!
Is this the expected bebaviour that one should not explcitly undef
the tied hash?
Regards,
Kenneth