use warnings;
use strict;
package MyApp::Dispatcher;
use Jifty::Dispatcher -base;
under '/admin/account' => run {
before '*' => set object_type => 'account';
before qr'/(\d+)' => run { set id => $1; };
on '/' => show 'crud/index';
on '/create' => show 'crud/create';
on '/*/update' => show 'crud/update';
on '/*' => show 'crud/view';
};
Edit: jibsheet pointed out that I'd misunderstood the Catalyst example. the code above should now be a more faithful implementation
Redundant run{...} (Score:1)
Redundant qr{...} (Score:1)
with this:
With both changes in place, it'd look like this:
Re: (Score:2)
Small suggestion (Score:1)
Range and hash support could make it look even better.
could become
Re: (Score:2)
Re: (Score:1)
Re: (Score:1)
Re: (Score:1)