There's more than one way to do things | |
PerlMonks |
Re: When -w and use strict aren't enough...by adrianh (Chancellor) |
on Nov 04, 2003 at 13:55 UTC ( [id://304415]=note: print w/replies, xml ) | Need Help?? |
But it would be nice if there was a way to catch such cases... Well, you've answered your own question when you said: "there could be autoloads providing the subroutine, or it could have been dynamically generated at runtime in an eval, or something. " The flexibility of Perl comes with a price. This is one of them. However, I would strongly disagree when you said: without having to write a test suite that exercises every code branch, which isn't always (or even usually) possible. If you can't test your code then something is wrong with it. Fix the design so you can test it. If you have problems doing this, then post a SOPW - I'm sure somebody could help ;-) Seriously, 100% test coverage is an attainable goal with surprisingly little effort.
In Section
Seekers of Perl Wisdom
|
|