good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Using only one subroutine from module fileby ferreira (Chaplain) |
on Jun 27, 2007 at 20:01 UTC ( [id://623726]=note: print w/replies, xml ) | Need Help?? |
First, it is important that you remember the difference between methods (sort of "subs called on an object or class") and subroutines. For methods, you just need to say or invoke some kind of constructor (creating an object) and using a piece of code like this: There is no need for doing more to have access to a method (no need for exporting, etc.) If the issue is with subroutines, the following may be valid. If you don't want to change Sheets.pm or is not under your control, the following may do the trick you want: (and you can discard the alias as well and use directly as Sheets::make_files, which is not that bad if used in a limited scope). The suggestion of the paragraph above "works" independent of the exporter module used or the idiosyncrasies of the provided import function. Well, works if there is not too much magic behind the panes.
In Section
Seekers of Perl Wisdom
|
|