Dancer-Plugin-CRUD
view release on metacpan or search on metacpan
lib/Dancer/Plugin/CRUD.pm view on Meta::CPAN
pop @$stack;
return %routes;
}
);
register(
wrap => sub($$$) {
my ( $action, $route, $coderef ) = @_;
my @route = grep { defined and length } split m{/+}, $route;
my $parent = @$stack ? $stack->[-1] : undef;
foreach my $route (@route) {
push @$stack => { resname => $route };
}
if ( defined $parent ) {
if ( exists $parent->{validation_rules}
and exists $parent->{validation_rules}->{wrap}
and exists $parent->{validation_rules}->{wrap}->{$action}
( run in 1.224 second using v1.01-cache-2.11-cpan-71847e10f99 )