I would like to put the modules loading dinamically:use My::AAA; use My::BBB; use My::CCC; my $module = 'My::' . $name_str; eval { $obj = $module->new(); }; if ($@) { print "Error loading module $module: $@\n"; exit; } $obj->login();
oreval { use "$module" };
Somehow i'm not getting this to work, any tips ? Thanks in advanceeval { require "$module" };
In reply to use or require ? by faro
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |