...or something to that effect, i.e. by using a string eval. This feels wrong (perlcritic complains about it also). What's the right way?eval "require $class"; if ( $@ ) { die "Can't load $class: $@"; } my $obj = $class->new;
In reply to eval "require $class" seems wrong by rvosa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |