[Catalyst] Patch for Catalyst::Manual::Intro

Phil Mitchell phil at 2people.org
Thu Oct 27 19:13:25 CEST 2005


On 10/27/05, Matt S Trout <dbix-class at trout.me.uk> wrote:
> On Thu, Oct 27, 2005 at 09:29:09AM -0700, Phil Mitchell wrote:
> > On 10/27/05, Will Hawes <info at whawes.co.uk> wrote:
> > > Attached is a patch to explain Regex actions in a little more depth. I think this is necessary from a new user's perspective -  I misunderstood how Regex actions work from day one and only had it clarified in IRC yesterday :)
> > >
> > > The patch is against Intro.pod from the 5.49_01 release on CPAN.
> >
> > Thanks a lot for this patch. I've been confused by regex actions, too.
> > However, is it true that this snippet matches /order/view/123? That's
> > a bit odd, since it has the end of string metacharacter ...
> >
> > +    sub view_good : Regex('^.*/view$') {
> >
> > +        # better!
> >
> > +    }
>
> Catalyst matches by path part, though
>
> /one/two/three
>
> will be dispatched as
>
> "Do we have anything to match /one/two/three?"
> "Do we have anything to match /one/two (to be executed with args of 'three')?"
> "Do we have anything to match /one (with args of ('two', 'three'))?"
> "Do we have anything to match / (with args of ('one', 'two', 'three'))?" [0]
> "What's the (possibly inherited) default for /one/two/three?"
>
> [0] Can't remember if this one actually happens, no time to check, sorry.
>

Ah, that's very helpful. I haven't checked the docs lately, but it
would be great to have that in there...

> --
>      Matt S Trout       Specialists in Perl consulting, web development, and
>   Technical Director    UNIX/Linux systems architecture and automation. Mail
> Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information
>
>  + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>


--
==========================
2People Blog: http://2-people.blogspot.com/
2People site: http://www.2people.org



More information about the Catalyst mailing list