> > It looks to me kind of like you're just reinventing a dumbed down
> > regex language. Why not just use normal Perl regexs? Besides not
> > having to remember another syntax, you've got pretty well every
> > conceivable case covered from the start. In most cases the regexes
> > will be really simple, but if you want to do something bizarre, you're
> > not limited to the scenarios envisioned by the developers, (making
> > simple things easy, difficult things possible, or however that goes)
>
> We started there. My first proposal looked like:
>
>      $self->dispatch([
>          qr{
>              /(?#rm)    (\w+)
>              /(?#user)  (\w+)
>              /(?#tags+) ([\w\+]+)
>          }x;
>      ]);
>
> Perl notably doesn't have named back references, which is what
> I hacked around with (?#user). Full REs are uglier and seem
> unnecessary, at least for an initial version.

Better would be simple strings that have a very strict syntax. Either
it parses exactly or an error is thrown. That way, we're not bound to
syntactic correctness for the URL format, but we still have Perl
around it.

No matter what, this needs to be part of some plugin and not part of
the main code. The current dispatch methodology also needs to be
pulled out of the main code and made into a plugin that is shipped
with the main code and enabled by default if no other dispatcher is
enabled. (And, I think, the installer for the main code needs to be
made more intelligent, but that's another topic.)

Rob

---------------------------------------------------------------------
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]

Reply via email to