in reply to Re: Re: How do I dynamically declare a package name for
in thread How do I dynamically declare a package name for
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.eval { $object = $class->new; };
|
---|