in reply to Re^6: Does anybody write tests first?
in thread Does anybody write tests first?
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.
|
---|