in reply to use constant and exporter

try replacing the curly braces around the constants with parentheses.
use constant ( VALID => 1, INVALID => 2, ERROR => 0, );

Replies are listed 'Best First'.
Re: Re: use constant and exporter
by Flame (Deacon) on Jan 28, 2003 at 03:41 UTC
    According to the docs, for multiple declarations you use a hashref.. Their example, copy-pasted:
    use constant { SEC => 0, MIN => 1, HOUR => 2, MDAY => 3, MON => 4, YEAR => 5, WDAY => 6, YDAY => 7, ISDST => 8, };

    So I don't think that's it. I'll try your suggestion anyway though.

    Edit: Just tried it, none of the constants worked, even those that did previously. (They work inside the module they were declared in, but won't export.)



    My code doesn't have bugs, it just develops random features.

    Flame ~ Lead Programmer: GMS (DOWN) | GMS (DOWN)