in reply to Re^2: Clean way to export all constants at once
in thread Clean way to export all constants at once
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.