in reply to Re: Web Site Mapper
in thread Web Site Mapper
I used to use constant all the time, but not anymore. It requires a relatively recent version of perl, and it loads up a lot of code that isn't really necessary for simple cases. Further, it is rather clunky to use it with anything more complex than a simple scalar constant. 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. That's extra noise with little appreciable gain. Using a subroutine with an empty prototype (which is what constant does anyway) doesn't add a lot of extra code and it avoids the problems constant creates.
----
: () { :|:& };:
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Web Site Mapper
by exussum0 (Vicar) on Feb 16, 2004 at 16:48 UTC | |
by hardburn (Abbot) on Feb 16, 2004 at 17:07 UTC | |
by grinder (Bishop) on Feb 16, 2004 at 21:55 UTC | |
|
Re^3: Web Site Mapper
by Aristotle (Chancellor) on Feb 16, 2004 at 21:54 UTC | |
by hardburn (Abbot) on Feb 16, 2004 at 22:09 UTC |