Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 cooling their heels in the Monastery: (5)
As of 2015-07-29 07:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls