Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- eval package
- George Mpouras
September 6, 2013, 10:18 pm
rate this thread
its dynamic name, but when I use eval
( my $PackageName = __FILE__ ) =~s/(?i)^.*?([^\/]+?)\.pm$/$1/;
eval "package $PackageName;";
the calling script can not find its subroutines.
( the $PackageName has the correct value "SomeCode" )
If i remove eval and just say
everything is ok; What happens here ?