For the reasons given in {net information loss), I see no advantage to your script over:
my @modules = get_module_list(); foreach my $module ( @modules ) { require $module; }
Except that you might discover more than one missing/corrupted module. But, and a very significant one IMO, is that you sould lose the information that told you why the (first) module failed to load. Eg.
Can't locate Non/Existant.pm in @INC (@INC contains: C:/Perl/lib C:/Pe +rl/site/lib .) at BEGIN failed--compilation aborted at -e line 1.
syntax error at Existant.pm line 2, near ") {" Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1.
In reply to Re^7: Does anybody write tests first?
by BrowserUk
in thread Does anybody write tests first?
by amarquis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |