Catalyst-Controller-DBIC-API
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Catalyst/Controller/DBIC/API.pm view on Meta::CPAN
{ message => 'No objects on which to operate' } );
$c->detach();
}
else {
$c->stash->{ $self->stash_key }->{ $self->item_root } =
$self->each_object_inflate( $c, $c->req->get_object(0)->[0] );
}
}
sub update_or_create {
my ( $self, $c ) = @_;
if ( $c->req->has_objects ) {
$self->validate_objects($c);
$self->transact_objects( $c, sub { $self->save_objects( $c, @_ ) } );
}
else {
$c->log->error($_);
$self->push_error( $c,
{ message => 'No objects on which to operate' } );
lib/Catalyst/Controller/DBIC/API/RPC.pm view on Meta::CPAN
$self->next::method($c);
}
sub item : Chained('object_with_id') : PathPart('') : Args(0) {
my ( $self, $c ) = @_;
$self->next::method($c);
}
sub update : Chained('object_with_id') : PathPart('update') : Args(0) {
my ( $self, $c ) = @_;
$self->update_or_create($c);
}
sub delete : Chained('object_with_id') : PathPart('delete') : Args(0) {
my ( $self, $c ) = @_;
$self->next::method($c);
}
sub update_bulk : Chained('objects_no_id') : PathPart('update') : Args(0) {
my ( $self, $c ) = @_;
$self->update_or_create($c);
}
sub delete_bulk : Chained('objects_no_id') : PathPart('delete') : Args(0) {
my ( $self, $c ) = @_;
$self->delete($c);
}
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.452 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )