in reply to eval string possibilities
Without eval, you would have to convert the module name to a file path before passing it to require.... my $q = CGI->new; my %modules = ( simple => 'Filter::Simple', hard => 'Filter::Util::Call' ); my $filter = $q->param("filter"); if(exists $modules{$filter}) { eval "require $modules{$filter}"; } ...
|
|---|