Mark Stosberg wrote:
On 2004-09-13, Michael Peters <[EMAIL PROTECTED]> wrote:
or this (vanilla cgi)
/app/index.cgi?/module_name/run_mode?extra_stuff...
into something that will be functionally similar to this
my $app = Module::Name->new(..);
$app->mode_param(sub {'run_mode'}); #this will set the run mode
Thanks for sharing this Michael.
Question: What happens if you model is named:
My::CamelCaps
Will it figure out that I mean
"CamelCaps" and not "Camelcaps" ?
Nope. If you can think of a good way for this to happen then I'm all
ears. Maybe there could be another parameter or hook to customize the
ucfirst behaviour that I'm doing.
Also, what about the edge case of having a module name
with an underscore in it?
This also won't work currently. If you think it's worth it then maybe we
can introduce another paramter/hook for this too.
I didn't think this would be the correct solution for someone to use for
existing apps, but for new ones. This is because all of you links,
forms, etc would have to use the new style of urls instead of the
traditional. So if you're just starting a new app and planning your
modules out, etc, it's now hard to enforce these simple naming
conventions. But, like I said before, I'm flexible and willing to add
something to fix these issues if someone needs them or has any ideas
about best to fix these problems.
--
Michael Peters
Developer
Plus Three, LP
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]