G
George Mpouras
I have a module /SomeDir/SomeCode.pm with a package name retrieved from
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
package SomeCode;
....
everything is ok; What happens here ?
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
package SomeCode;
....
everything is ok; What happens here ?