I think that Puneet is suggesting to have a syntax for non-mandatory parts in the route specifier, i.e. the foo_id might be there, as in:
I don't followOn Mon, Jan 17, 2011 at 9:03 PM, Puneet Kishor <punk.kish@gmail.com> wrote:
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
_______________________________________________
Dancer-users mailing list
Dancer-users@perldancer.org
http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
_______________________________________________
Dancer-users mailing list
Dancer-users@perldancer.org
http://www.backup-manager.org/cgi-bin/listinfo/dancer-users