"be consistent" | |
PerlMonks |
Re: Re: Re: How do I dynamically declare a package name forby gildir (Pilgrim) |
on Apr 27, 2001 at 21:14 UTC ( [id://76176]=note: print w/replies, xml ) | Need Help?? |
Yes, but there is big difference when calling:
and eval " $object = $class->new; "; In the former case, code is compiled as soon as it is first encountered by perl compiler, that is at compile time and it is compiled only once. While in the later case the code is compiled at run-time and is compiled every time the eval() is run. There is no way to do eval { use $class; }; so I must use eval " use $class; "; version, and I try to execute it as seldom as possible.
In Section
Seekers of Perl Wisdom
|
|