classes under session should weaken their session references

This commit is contained in:
Graham Knop 2010-04-16 19:29:18 -05:00
parent 241c94175f
commit 2b78fe913b
17 changed files with 81 additions and 248 deletions

View file

@ -21,7 +21,8 @@ use DateTime::Format::Mail;
use DateTime::TimeZone;
use Tie::IxHash;
use WebGUI::International;
use WebGUI::Utility;
use WebGUI::Utility qw(round);
use Scalar::Util qw(weaken);
=head1 NAME
@ -226,19 +227,6 @@ sub dayStartEnd {
#-------------------------------------------------------------------
=head2 DESTROY ( )
Deconstructor.
=cut
sub DESTROY {
my $self = shift;
undef $self;
}
#-------------------------------------------------------------------
=head2 epochToHttp ( [ epoch ] )
Converts and epoch date into an HTTP formatted date.
@ -808,7 +796,9 @@ A reference to the current session.
sub new {
my $class = shift;
my $session = shift;
bless {_session=>$session}, $class;
my $self = bless { _session => $session }, $class;
weaken $self->{_session};
return $self;
}
#-------------------------------------------------------------------