in reply to How to set a set of our and @EXPORT variables concisely?

I'm confused about your design. Are you exporting a large number of variables because they are constants needed for an interface? If so, you should be exporting functions created with use constant instead.

If instead you expect many other modules to mangle variables directly in your namespace, you are asking for trouble in maintenance. Don't make me maintain your code once you've done that. If someone gave me that code to maintain, I'd probably start by rewriting it to introduce interface subroutines for everything.

Export functionality, not data. Learn at least something from the OO movement.

-- Randal L. Schwartz, Perl hacker

  • Comment on Re: How to set a set of our and @EXPORT variables concisely?