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

Re: How to check program links correctly?

by TilRMan (Friar)
on Aug 20, 2004 at 09:50 UTC ( #384568=note: print w/ replies, xml ) Need Help??


in reply to How to check program links correctly?

There's a module called B::Lint that can check for undefined subroutines (but not methods). I've had mixed success with it.

<rant>

This is my single biggest pet peeve with Perl. The whole 'But it might be defined when you get around to calling it' excuse is a cop-out. In most production code, if your subroutine isn't defined (or at least declared) by the time CHECK rolls around, it's probably not going to be. The inconvenience of having to declare your subroutines at compile time is far less than that of your script bailing at run time.

I like tachyon's idea of use strict 'functions', though I'd like it even better if it was part of vanilla use strict.

</rant>

Maybe this would be a good reason for me to finally learn some Perl internals.


Comment on Re: How to check program links correctly?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2014-08-23 13:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (173 votes), past polls