Don't AUTOLOAD calls to DESTROY. Avoids Could not load WebGUI::Form::DESTROY because Can't locate WebGUI/Form/DESTROY.pm in /data/WebGUI/lib/WebGUI/Pluggable.pm line 247.

This commit is contained in:
Scott Walters 2010-07-19 12:33:32 -04:00
parent 2e4656931e
commit 3f52bd337f

View file

@ -82,6 +82,7 @@ sub AUTOLOAD {
our $AUTOLOAD;
my $self = shift;
my $name = ucfirst((split /::/, $AUTOLOAD)[-1]);
return if $name eq 'DESTROY';
my %params = @_;
$params{rowClass} ||= $self->{_class};
my $control = eval { WebGUI::Pluggable::instanciate("WebGUI::Form::".$name, "new", [ $self->session, %params ]) };