"be consistent" | |
PerlMonks |
Re: USE or Require?by hardburn (Abbot) |
on Jul 23, 2003 at 15:52 UTC ( [id://277219]=note: print w/replies, xml ) | Need Help?? |
I find that modules that export by default aren't a big deal as long as the sub names are descriptive and you keep your use statement tight to the code that needs it. For instance, the Compress::Zlib module exports compress() and decompress() automatically. In a recent bit of code, I wrote something like this:
It should be fairly obvious, without reading the Compress::Zlib docs, where compress() comes from. I will concede the point that this is not always possible, and that you often have little control over the sub names of a module. ---- Note: All code is untested, unless otherwise stated
In Section
Meditations
|
|