in reply to define.pm - a new pragma to declare global constants

In the first paragraph under DESCRIPTION, you say that there are three ways to call the pragma, but you only demonstrate two of them.

--rjray

  • Comment on Re: define.pm - a new pragma to declare global constants

Replies are listed 'Best First'.
(MeowChow) Re2: define.pm - a new pragma to declare global constants
by MeowChow (Vicar) on Apr 02, 2002 at 22:16 UTC
    Whoops, good catch. I had removed the third way, which was to simply call use define; with no arguments. This would have imported all global constants into the namespace. I decided that any constants that were actually used would get no define ... statements anyway, so this call was superfluous. Thoughts anyone?
       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print
      Yeah, comment:   Requiring no define's is a forced use strict;.  Sure, use strict; makes for better maintanability/reusability, but it's not on by default (and if it were, it could be turned off).

      Having use define 'just work' seems like it would be a boon during development -- or for one-shots, prototypes, in-house utility hacks, whatever.

          p

        That's a very good point, and a good analogy. I think I'll throw that code back in.
           MeowChow                                   
                       s aamecha.s a..a\u$&owag.print