Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Dispatchers for dummies

by sri (Vicar)
on Oct 14, 2008 at 22:46 UTC ( #717110=note: print w/ replies, xml ) Need Help??


in reply to Re: Dispatchers for dummies
in thread Dispatchers for dummies

I would like to support Perl 5.8, apart from the fact that raw regex looks quite ugly.
A huge advantage of patterns like i'm using them is that you can rebuild the path very easily.

The /foo/123 /foo/abc example is already possible since patterns get compiled to regex internally.

$r->route('/:(number)_:(word)/foo', number => qr/\d+/, word => qr/\w+/ +)


Comment on Re^2: Dispatchers for dummies
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://717110]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (12)
As of 2014-07-31 15:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (249 votes), past polls