in reply to Re: module problems
in thread module problems

You can also do use my_mod qw(cat) ... in other words, declaring the names from my_mod that you wish to, well, “import from” it.

I personally believe you missed something very important: what you suggest will only work if my_mod uses Exporter (or otherwise reimplements its functionality, to be really anal) to include cat in the list of symbols allowed to be exported, through @EXPORT_OK.

Simply doing what you suggest will only cause the use statement to call my_mod->import('cat'). But the import method must be implemented, and Exporter provides a "standard", flexible way to do so.

PS: why are you using <tt> tags? Code tags should be the preferred way to refer to code, be it a single name, in PM. And <c> is even easier to type, than <tt>.

--
If you can't understand the incipit, then please check the IPB Campaign.