in reply to Re^2: Use with variable
in thread Use with variable
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 ...)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Use with variable
by edan (Curate) on Sep 08, 2004 at 13:42 UTC | |
by Corion (Patriarch) on Sep 08, 2004 at 13:48 UTC | |
by edan (Curate) on Sep 08, 2004 at 14:15 UTC | |
by Anonymous Monk on Sep 08, 2004 at 14:43 UTC | |
by Corion (Patriarch) on Sep 08, 2004 at 14:47 UTC |