Ignore calls to DESTROY in AUTOLOAD, as a matter of policy.

This commit is contained in:
Scott Walters 2010-07-20 08:12:15 -04:00
parent a8e179a47b
commit e88365cbb4
2 changed files with 2 additions and 0 deletions

View file

@ -57,6 +57,7 @@ Dynamically creates functions on the fly for all the different form control type
sub AUTOLOAD {
our $AUTOLOAD;
return if $AUTOLOAD =~ m/::DESTROY$/;
my $name = ucfirst((split /::/, $AUTOLOAD)[-1]);
my $session = shift;
my @params = @_;

View file

@ -70,6 +70,7 @@ sub AUTOLOAD {
my $params = shift;
my @args = @_;
return if $AUTOLOAD =~ m/::DESTROY$/;
my $name = ucfirst((split /::/, $AUTOLOAD)[-1]);
$params = {name=>$params} if ref ($params) ne "HASH";
my $control = eval { WebGUI::Pluggable::instanciate("WebGUI::Form::".$name, "new", [ $self->session, $params ]) };