Re: [Catalyst] Chained Regexes

2008-09-27 Thread Matt S Trout
On Wed, Sep 24, 2008 at 07:10:38AM -0700, Ovid wrote:
> Pursuant to a refactoring issue I explained at 
> http://use.perl.org/~Ovid/journal/37525, it would be nice if I could mix 
> regexes with Chained actions.  There are some nice refactoring potential.  
> Plus, by allowing me to apply a regex to a CaptureArg or Arg, I could get 
> 404s for free.  Having to write this manually is a bit disappointing.

The solution here is to implement match_captures to do for captures what
match on action objects already does for args.

Having done that, your action class can do pretty much whatever the hell it
wants, regexps or db lookups or etc.

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical Directorhttp://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/http://www.shadowcat.co.uk/servers/

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Chained Regexes

2008-09-24 Thread Ovid
Pursuant to a refactoring issue I explained at 
http://use.perl.org/~Ovid/journal/37525, it would be nice if I could mix 
regexes with Chained actions.  There are some nice refactoring potential.  
Plus, by allowing me to apply a regex to a CaptureArg or Arg, I could get 404s 
for free.  Having to write this manually is a bit disappointing.

Or if someone could kindly point me to the docs on where I messed up, that 
would be great :)

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/