CatalystX-CRUD
view release on metacpan or search on metacpan
lib/CatalystX/CRUD/REST.pm view on Meta::CPAN
Overrides base method to disable chaining.
=cut
sub rm { shift->next::method(@_) }
=head2 remove( I<context> )
Overrides base method to disable chaining.
=cut
sub remove { shift->next::method(@_) }
=head2 add( I<context> )
Overrides base method to disable chaining.
=cut
sub add { shift->next::method(@_) }
=head2 view_related( I<context> )
Overrides base method to disable chaining.
=cut
sub view_related { shift->next::method(@_) }
=head2 list_related( I<context> )
Overrides base method to disable chaining.
=cut
sub list_related { shift->next::method(@_) }
=head2 delete( I<context> )
Overrides base method to disable chaining.
=cut
sub delete { shift->next::method(@_) }
=head2 read( I<context> )
Overrides base method to disable chaining.
=cut
sub read { shift->next::method(@_) }
=head2 update( I<context> )
Overrides base method to disable chaining.
=cut
sub update { shift->next::method(@_) }
=head2 postcommit( I<context>, I<object> )
Overrides base method to redirect to REST-style URL.
=cut
sub postcommit {
my ( $self, $c, $o ) = @_;
my $id = $self->make_primary_key_string($o);
unless ( defined $c->res->location and length $c->res->location ) {
if ( $c->action->name eq 'rm' ) {
$c->response->redirect( $c->uri_for('') );
}
else {
$c->response->redirect( $c->uri_for( '', $id ) );
}
}
$self->next::method( $c, $o );
}
=head2 new
Overrides base method just to call next::method to ensure
config() gets merged correctly.
=cut
sub new {
my ( $class, $app_class, $args ) = @_;
return $class->next::method( $app_class, $args );
}
1;
__END__
=head1 AUTHOR
Peter Karman, C<< <perl at peknet.com> >>
=head1 BUGS
Please report any bugs or feature requests to
C<bug-catalystx-crud at rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CatalystX-CRUD>.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc CatalystX::CRUD
You can also look for information at:
( run in 0.905 second using v1.01-cache-2.11-cpan-39bf76dae61 )