Instead of using the constant pragma, I'd use the Readonly module and create a readonly hash which is exported.
You could even take it a step further and define individual lexical scalars in your module and export a readonly dispatch table of anonymous subs that return the individual scalar values.
You may also want to read this review http://neilb.org/reviews/constants.html of 21 different modules that can be used to define constants.
In reply to Re^3: Clean way to export all constants at once
by fishmonger
in thread Clean way to export all constants at once
by perl_help26
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |