No eval required, unless you are guarding against the requested class or method not existing or the method throwing an exception.my $class = "A::N::Other::".ucfirst($typeTableName); (my $classFile = "$class.pm") =~ s!::!/!g; require $classFile; $fooOb = $class->doSomeBar($id);
In reply to Re: Arbritrarily requireing classes.
by ysth
in thread Arbritrarily requireing classes.
by graq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |