Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: [Catalyst] How do you handle "URL Parameters" (aka advanced "route matching")

by Theodore (Scribe)
on Apr 03, 2014 at 13:11 UTC ( #1080948=note: print w/ replies, xml ) Need Help??


in reply to [Catalyst] How do you handle "URL Parameters" (aka advanced "route matching")

Hi,

In Catalyst, you can use something like:

sub entry :Args(4) { my ($self, $c, $year, $month, $date, $title) = @_; [locate and print article based on year etc] }
for a url like:
http://address/entry/year/month/date/title http://address/entry/2014/04/03/foo
See the documentation about :Args. Arguments are also found under $c->request->arguments.


Comment on Re: [Catalyst] How do you handle "URL Parameters" (aka advanced "route matching")
Select or Download Code
Re^2: [Catalyst] How do you handle "URL Parameters" (aka advanced "route matching")
by three18ti (Scribe) on Apr 04, 2014 at 07:32 UTC

    That's too easy.

    Thanks a million!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2014-12-26 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls