In article <suppressed>, Brian Cassidy wrote:
>
> I was working on a CGI::App, when it dawned on me that it's a little
> silly that I have to explicitly declare an AUTOLOAD runmode. It irks me
> a little because it's not really one of my VALID run modes, but
> declaring it with $self->run_modes() means that if someone calls my app
> with rm=AUTOLOAD CGI::App thinks it's a valid run-mode.
>
> It's really a minor quibble, because in theory, calling an app with
> rm=AUTOLOAD will do the same for any invalid runmode (and calling the
> app with rm=AUTOLOAD will still go to the AUTOLOAD sub even if AUTOLOAD
> isn't a valid runmode).
>
> Basically, I'm suggesting a default AUTOLOAD sub so I don't have to
> pollute my run_modes hash table. Obviously, it's not a matter of
> high-importance, but I'm curious how others feel about it.
So you are suggesting that a basic AUTOLOAD method exist by default to
address the case of people submitting "rm=AUTOLOAD" when it doesn't
exist?
I'm not really concerned about that case. I think if people submit
any run mode that doesn't exist, it's an error, even if it happens to be
named AUTOLOAD.
Perhaps you are suggesting that "AUTOLOAD" would be better handled
outside of the run_modes() function, since it's not really a run mode
itself? That makes some sense. However, considering it's already there,
it's convenient, and there seems to be a very marginal negative
side-effect, I'm inclined to leave it alone.
Mark
--
http://mark.stosberg.com/
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.