in reply to Re: Re: Web Site Mapper
in thread Web Site Mapper

For instance, to handle the SITES constant above, I would need to change it to an arrayref and modify the site checking code to derefernce the array.

What are you talking about? You can simply
use constant SITES => qw(foo.com bar.com baz.com);
and it'll do what you'd expect.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re^4: Web Site Mapper
by hardburn (Abbot) on Feb 16, 2004 at 22:09 UTC

    Ahh, I see what I was thinking of: when defining multiple constants on one line, you have to follow the same rules as hashrefs everywhere else (because that's exactly what you're passing to constant.pm). That means using arrayrefs, even when all you really need is an array. As you demonstrated, that isn't necessary when using a single constant.

    ----
    : () { :|:& };:

    Note: All code is untested, unless otherwise stated