That's what I get for not testing my stuff :-((
So it seems the only actually working way is the ugly way of converting the module name to the file name and then requiring that file :
my $module = "CGI"; my $filename = $module; $filename =~ s!::!/!g; $filename .= ".pm"; require $filename or die "$module did not return a true value"; $module->import;
(this time tested it ...)
In reply to Re^3: Use with variable
by Corion
in thread Use with variable
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |