Re: How to export constants to a module?



Harris More wrote:
How do I export a constant to a pm module?  Or maybe the question is, How
do I make a constant in the caller routine visible to modules?
>
This is one of those things that is either so simple that "everybody"
(except me) knows how to do it, or so simple that I am not seeing the
forest for the trees. It is probably in perldocs but so far I have come up
blank. Can't get around the "Bareword not allowed while strict subs..."

I hate to have to assign the constant to a variable to move it across the
interface, especially since I have a LOT of constants.  So far I have
learned a ton of good stuff trying to fix it, but unfortunately nothing
about making constants visible to a module.

I'm not entirely sure what you're after here, but check out

perldoc Exporter

Mark
.



Relevant Pages