in reply to Re: managing constants created with constant.pm
in thread managing constants created with constant.pm

In 5.8.1, $ perl -e'use constant { FOO = 1, BAR = 2}; print FOO,BAR' does not compile. With stringy commas, the combined form does work,

$ perl -e'use constant { FOO => 1, BAR => 2}; print FOO,BAR' 12$
'1' and '3' are not legal names for subs.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: managing constants created with constant.pm
by Abigail-II (Bishop) on Jul 14, 2003 at 08:57 UTC
    You are right about the stringification (I missed that), but your post suggested the hashref as only argument was incorrect, and that you need a use constant for each constant used.

    Abigail