remove useless DESTROYs

This commit is contained in:
Graham Knop 2010-04-16 19:30:07 -05:00
parent 2b78fe913b
commit 5122518652
23 changed files with 8 additions and 187 deletions

View file

@ -49,7 +49,6 @@ Gracefully shuts down the scheduler.
sub _stop {
my ($kernel, $self) = @_[KERNEL, OBJECT];
$self->debug("Stopping the scheduler.");
undef $self;
}
#-------------------------------------------------------------------

View file

@ -50,7 +50,6 @@ Gracefully shuts down the workflow manager.
sub _stop {
my ($kernel, $self) = @_[KERNEL, OBJECT];
$self->debug("Stopping workflow manager.");
undef $self;
}
#-------------------------------------------------------------------

View file

@ -106,19 +106,6 @@ sub delete {
#-------------------------------------------------------------------
=head2 DESTROY ( )
Deconstructor.
=cut
sub DESTROY {
my $self = shift;
undef $self;
}
#-------------------------------------------------------------------
=head2 displayImpression ( dontCount )
Finds out what the next ad is to display, increments it's impression counter, and returns the HTML to display it.

View file

@ -96,19 +96,6 @@ sub delete {
#-------------------------------------------------------------------
=head2 DESTROY ( )
Deconstructor.
=cut
sub DESTROY {
my $self = shift;
undef $self;
}
#-------------------------------------------------------------------
=head2 get ( name )
Returns the value of a property.

View file

@ -442,7 +442,7 @@ sub view {
}
my $p = WebGUI::Asset::Wobject::HttpProxy::Parse->new($self->session, $proxiedUrl, $var{content}, $self->getId,$self->rewriteUrls,$self->getUrl,$self->urlPatternFilter);
$var{content} = $p->filter; # Rewrite content. (let forms/links return to us).
$p->DESTROY;
undef $p;
if ($var{content} =~ /<frame/gis) {
$var{header} = "text/html";

View file

@ -50,11 +50,6 @@ my %tag_attr = (
"script src" => 1
);
sub DESTROY {
my $self = shift;
$self = undef;
}
=head2 new ( $class, $session)
Constructor for parser.

View file

@ -213,7 +213,6 @@ sub disconnect {
if (defined $self->{_dbh}) {
$self->{_dbh}->disconnect() unless ($self->getId eq "0");
}
undef $self;
}
#-------------------------------------------------------------------

View file

@ -17,6 +17,7 @@ package WebGUI::FormValidator;
use strict qw(vars subs);
use WebGUI::HTML;
use WebGUI::Pluggable;
use Scalar::Util qw(weaken);
=head1 NAME
@ -79,21 +80,6 @@ sub AUTOLOAD {
return $control->getValue(@args);
}
#-------------------------------------------------------------------
=head2 DESTROY ( )
Deconstructor.
=cut
sub DESTROY {
my $self = shift;
undef $self;
}
#-------------------------------------------------------------------
=head2 get ( )
@ -120,9 +106,11 @@ A reference to the current session.
=cut
sub new {
my $class = shift;
my $session = shift;
bless {_session=>$session}, $class;
my $class = shift;
my $session = shift;
my $self = bless {_session=>$session}, $class;
weaken $self->{_session};
return $self;
}

View file

@ -270,7 +270,6 @@ sub delete {
$self->session->db->write("delete from groups where groupId=?", [$self->getId]);
$self->session->db->write("delete from groupings where groupId=?", [$self->getId]);
$self->session->db->write("delete from groupGroupings where inGroup=? or groupId=?", [$self->getId, $self->getId]);
undef $self;
}
#-------------------------------------------------------------------
@ -363,21 +362,6 @@ sub description {
return $self->get("description");
}
#-------------------------------------------------------------------
=head2 DESTROY
Desconstructor
=cut
sub DESTROY {
my $self = shift;
undef $self;
}
#-------------------------------------------------------------------
=head2 expireNotify ( [ value ] )

View file

@ -91,20 +91,6 @@ sub AUTOLOAD {
$self->{_data} .= $control->toHtmlWithWrapper;
}
#-------------------------------------------------------------------
=head2 DESTROY ( )
Disposes of the form object.
=cut
sub DESTROY {
my $self = shift;
$self = undef;
}
#-------------------------------------------------------------------
=head2 dynamicForm ( $formDefinition, $listName, $who )

View file

@ -119,19 +119,6 @@ sub canRead {
#-------------------------------------------------------------------
=head2 DESTROY ( )
Deconstructor.
=cut
sub DESTROY {
my $self = shift;
undef $self;
}
#-------------------------------------------------------------------
=head2 getMessage ( messageId [, userId] )
Returns a WebGUI::Inbox::Message object.

View file

@ -260,19 +260,6 @@ sub delete {
#-------------------------------------------------------------------
=head2 DESTROY ( )
Deconstructor.
=cut
sub DESTROY {
my $self = shift;
undef $self;
}
#-------------------------------------------------------------------
=head2 get ( property )
Returns the value of a property.

View file

@ -121,10 +121,10 @@ sub connectToLDAP {
}
#-------------------------------------------------------------------
sub DESTROY {
my $self = shift;
$self->unbind;
undef $self;
}
#-------------------------------------------------------------------

View file

@ -151,19 +151,6 @@ sub delete {
#-------------------------------------------------------------------
=head2 DESTROY ( )
Deconstructor.
=cut
sub DESTROY {
my $self = shift;
undef $self;
}
#-------------------------------------------------------------------
=head2 _filterKeywords ( $keywords )
Perform filtering and cleaning up of the keywords before submitting them. Ideographic characters are padded

View file

@ -91,7 +91,6 @@ Removes this address from the book.
sub delete {
my $self = shift;
$self->addressBook->session->db->deleteRow("address","addressId",$self->getId);
undef $self;
return undef;
}

View file

@ -91,7 +91,6 @@ sub delete {
$address->delete;
}
$self->session->db->write("delete from addressBook where addressBookId=?",[$self->getId]);
undef $self;
return undef;
}

View file

@ -182,7 +182,6 @@ sub delete {
$item->delete;
}
$self->session->db->write("delete from transaction where transactionId=?",[$self->getId]);
undef $self;
return undef;
}

View file

@ -74,7 +74,6 @@ Removes this item from the transaction.
sub delete {
my $self = shift;
$self->transaction->session->db->deleteRow("transactionItem","itemId",$self->getId);
undef $self;
return undef;
}

View file

@ -163,21 +163,6 @@ sub demoteActivity {
}
}
#-------------------------------------------------------------------
=head2 DESTROY ( )
Deconstructor.
=cut
sub DESTROY {
my $self = shift;
undef $self;
}
#-------------------------------------------------------------------
=head2 get ( name )

View file

@ -169,23 +169,8 @@ sub delete {
my $sth = $self->session->db->prepare("delete from WorkflowActivityData where activityId=?");
$sth->execute([$self->getId]);
$self->session->db->deleteRow("WorkflowActivity","activityId",$self->getId);
undef $self;
}
#-------------------------------------------------------------------
=head2 DESTROY ( )
Deconstructor.
=cut
sub DESTROY {
my $self = shift;
undef $self;
}
#-------------------------------------------------------------------
=head2 execute ( object, instance )

View file

@ -87,23 +87,8 @@ sub delete {
if (! $skipNotify) {
WebGUI::Workflow::Spectre->new($self->session)->notify("cron/deleteJob", $self->session->config->getFilename."-".$self->getId);
}
undef $self;
}
#-------------------------------------------------------------------
=head2 DESTROY ( )
Deconstructor.
=cut
sub DESTROY {
my $self = shift;
undef $self;
}
#-------------------------------------------------------------------
=head2 get ( name )

View file

@ -106,7 +106,6 @@ sub delete {
$self->session->db->write("delete from WorkflowInstanceScratch where instanceId=?",[$self->getId]);
$self->session->db->deleteRow("WorkflowInstance","instanceId",$self->getId);
WebGUI::Workflow::Spectre->new($self->session)->notify("workflow/deleteInstance",$self->getId) unless ($skipNotify);
undef $self;
}
#-------------------------------------------------------------------
@ -143,7 +142,6 @@ sub DESTROY {
$self->start;
}
delete $self->{_workflow};
undef $self;
}

View file

@ -39,19 +39,6 @@ These methods are available from this class:
#-------------------------------------------------------------------
=head2 DESTROY ( )
Deconstructor.
=cut
sub DESTROY {
my $self = shift;
undef $self;
}
#-------------------------------------------------------------------
=head2 notify ( module, params )
Sends a message to Spectre.