For the rest of the code, though, you don't need eval:
my $class = "Category::$classpart"; my $methodname = ....; eval "use $class" or die; # die; propagates the current $@ my $handle = $class->new; $handle->$methodname($key,$params,$testCase);
In reply to Re: Dynamic use/require
by Joost
in thread Dynamic use/require
by Elijah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |