Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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.


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.


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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://384568]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2017-06-25 21:44 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (571 votes). Check out past polls.