I changed the method to the following, which worked perfectly:
I normally use the -> operator for method calls, but figured the only way to dynamically name an object was with the new class (@args) format.my $fullClass = "SuperWidget::Widget::" . $className; my $widget = $fullClass->new($widgetID);
joecamel
In reply to Re: Re: How to a construct objects with variables as class names?
by joecamel
in thread How to a construct objects with variables as class names?
by joecamel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |