Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: How to check program links correctly?

by TilRMan (Friar)
on Aug 20, 2004 at 09:50 UTC ( [id://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.