Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^7: Does anybody write tests first?

by BrowserUk (Pope)
on Feb 22, 2008 at 21:09 UTC ( #669644=note: print w/replies, xml ) Need Help??

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.

  • Module missing:
    Can't locate Non/ in @INC (@INC contains: C:/Perl/lib C:/Pe +rl/site/lib .) at BEGIN failed--compilation aborted at -e line 1.
  • Compilation error:
    syntax error at line 2, near ") {" Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1.
  • Other(s)?

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://669644]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2019-11-22 02:36 GMT
Find Nodes?
    Voting Booth?
    Strict and warnings: which comes first?

    Results (107 votes). Check out past polls.