in reply to Re: How to a construct objects with variables as class names?
in thread How to a construct objects with variables as class names?
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
|
---|