unless default params already exist, the following would make life a lot easier get '/foo/:foo_id?/bar/:bar_id?' => sub { my $foo_id = params->{'foo_id'} || <default foo value>; my $bar_id = params->{'bar_id'} || <default bar value>; }; Many thanks, -- Puneet Kishor