Perl: the Markov chain saw | |
PerlMonks |
Re^2: Exporter in an OO module?by SBECK (Chaplain) |
on Jan 04, 2017 at 16:06 UTC ( [id://1178939]=note: print w/replies, xml ) | Need Help?? |
That does help, thanks. The exported constants ARE all uppercase as in the example, and will never overlap the name of a function, so I'm safe there. I hadn't considered the EXPORT_OK, but given that the OO interface is completely new, I don't mind requiring the users to specify that they want the constants. Though if I do that, I could just as easily require the user to include:
in their script. Then I avoid the necessity of exporting anything. Initially I was trying to avoid the user having to do anything special to access the constants (because they're automatically available with the traditional functional interface), but given that the OO interface is completely new, perhaps that's not a necessary, or even desirable, requirement.
In Section
Seekers of Perl Wisdom
|
|