in reply to How to a construct objects with variables as class names?
Perl guesses that class::new() is defined and tries that. But you havn't given it a class name, you've given it a variable. You might trynew class, @args
I've had some luck with that in the past. By the way, 'pointy' is the preferable way to invoke methods on objects and classes, as it eliminates the uncertainty of who's method is being called. Also, make sure that $class has been required, and actually is compiled.$class->new( @args )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How to a construct objects with variables as class names?
by joecamel (Hermit) on Feb 14, 2001 at 11:32 UTC |