A qualified yes...
As with Perl itself, doesn't the real answer depend on the specific context? We saw three (or four, depending on who's counting) different ways to tackle the problem. I admit, your approach best fit the actual context. I can imagine other contexts where the other approaches might offer advantages.
Certainly it makes sense to use a module's error handling facilities when possible. However, my work with the Windows API (yes, I know it sucks, but there you are.) suggests that there are times when a selective use of a library's features can provide more than the original designer thought could (or should) be made made available (or documented).
That suggests, of course, a certain level of familiarity of said API...and a certain level of mastery over the implementation. Not to mention (something us Win folk are still amazed at), access to source (or, as is more common for us, access to definitions via header files).
In turn, it suggests that unless you feel confident that you have said familiarity, you should defer to the module's author, as that's really the whole point of modules. Isn't it? Follow another, more experienced person's footsteps to benefit from their experience, knowlege, and agony?
And, should you choose to break the rules *or* do something really tricky, please, please, oh *PLEASE* document it in comments so lesser mortals can see (and follow) your wisdom...
--fP.S. Sorry...that's a sore spot at the moment. It'll heal; promise...
In reply to Re: Is there always MTOWTDI?
by footpad
in thread Is there always MTOWTDI?
by PsychoSpunk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |