requires 'Devel::Declare' => '0.001006';
requires 'MooseX::Types' => '0.04';
requires 'Scalar::Util';
+requires 'File::ShareDir';
install_share;
sub list :Chained('base') :PathPart('') :Args(0) {
my ($self, $c) = @_;
- $self->basic_page($c, [{ collection => $self->get_collection($c) }]);
+ $self->basic_page($c, { collection => $self->get_collection($c) });
}
sub view :Chained('object') :Args(0) {
my ($self, $c) = @_;
- $self->basic_page($c, [{ model => $c->stash->{object} }]);
+ $self->basic_page($c, { model => $c->stash->{object} });
}
sub basic_page {
sub delete_all :Chained('base') :PathPart('delete_all') :Args(0) {
my ($self, $c) = @_;
- $self->basic_model_action( $c, [{ next_action => 'list'}]);
+ $self->basic_model_action( $c, { next_action => 'list'});
}
sub after_create_callback {
my @cap = @{$c->req->captures};
pop(@cap); # object id
my $vp_args = { next_action => [ $self, 'redirect_to', 'list', \@cap ]};
- $self->basic_model_action( $c, [$vp_args]);
+ $self->basic_model_action( $c, $vp_args);
}
sub delete :Chained('object') :Args(0) {
my @cap = @{$c->req->captures};
pop(@cap); # object id
my $vp_args = { next_action => [ $self, 'redirect_to', 'list', \@cap ]};
- $self->basic_model_action( $c, [$vp_args]);
+ $self->basic_model_action( $c, $vp_args);
}
sub basic_model_action {