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

Regular expressions in URLs are frowned up in Cat (and I agree; it’s harder to get right than other approaches). The package that does it was even split out of the core last year. I have done this kind of date thing before and this is what I’d recommend.

package MyApp::Controller::WhatEver; use warnings; use strict; use parent "Catalyst::Controller"; use Date::Calc "check_date"; sub by_date : Path("d") Args(3) { my ( $self, $c, $yyyy, $mm, $dd ) = @_; $c->detach( YOUR_404_HANDLER ) unless eval { check_date($yyyy,$mm, +$dd) }; my $some_rs = $c->model("Your::Schema")->search({ ...use dates... +}); $some_rs->count || $c->detach( YOUR_404_HANDLER ); }

Update (2014-07-26): Sloppy. check_date is fatal with bad input, added eval, See also: Re: Script to validate date fails.