Handel
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Catalyst/Helper/Controller/Handel/Cart.pm view on Meta::CPAN
=item Parameters: quantity
=back
Updates the specified cart item qith the quantity given.
[% uri %]/update/
=cut
sub update : Local {
my ($self, $c) = @_;
if ($c->req->method eq 'POST') {
if ($c->forward('validate')) {
if (my $cart = $c->forward('load')) {
my $item = $cart->items({
id => $c->req->param('id')
})->first;
if ($item) {
lib/Handel/Base.pm view on Meta::CPAN
$self->{'storage'} = $storage;
} else {
no strict 'refs';
${"$class\:\:_storage"} = $storage;
};
return;
};
sub update {
my $self = shift;
return $self->result->update(@_);
};
1;
__END__
=head1 NAME
lib/Handel/Components/Constraints.pm view on Meta::CPAN
};
};
sub insert {
my $self = shift;
$self->check_constraints;
return $self->next::method(@_);
};
sub update {
my $self = shift;
$self->check_constraints;
return $self->next::method(@_);
};
1;
__END__
=head1 NAME
lib/Handel/Components/DefaultValues.pm view on Meta::CPAN
return;
};
sub insert {
my $self = shift;
$self->set_default_values;
return $self->next::method(@_);
};
sub update {
my $self = shift;
$self->set_default_values;
return $self->next::method(@_);
};
1;
__END__
=head1 NAME
lib/Handel/Manual/Cookbook/WritingCustomStorage.pod view on Meta::CPAN
return $self->storage_result->getAttribute('id');
};
=head2 Updating Results
When autoupdates are off, one has to call update manually to save the changes made to cart and item nodes.
When autoupdates are enabled, update will be called automatically on each result. To support updates we
need to create an update method on the custom result class:
sub update {
my ($self, $data) = @_;
if ($data) {
foreach my $key (keys %{$data}) {
$self->storage_result->setAttribute($key, $data->{$key});
};
};
$self->storage->save_file;
};
lib/Handel/Storage/DBIC/Result.pm view on Meta::CPAN
sub discard_changes {
return shift->storage_result->discard_changes(@_);
};
sub has_column {
my ($self, $column) = @_;
return $self->storage_result->has_column_loaded($column);
};
sub update {
return shift->storage_result->update(@_);
};
1;
__END__
=head1 NAME
Handel::Storage::DBIC::Result - Result object returned by DBIC storage operations
lib/Handel/Storage/Result.pm view on Meta::CPAN
sub has_column {
my ($self, $column) = @_;
if ($self->can($column)) {
return 1;
} else {
return;
};
};
sub update {
Handel::Exception::Virtual->throw;
};
sub add_item {
return $_[0]->storage->add_item(@_)
};
sub delete_items {
return $_[0]->storage->delete_items(@_);
};
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.552 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )