view release on metacpan or search on metacpan
lib/Carton/Builder.pm view on Meta::CPAN
}
return @options;
}
sub update {
my($self, $path, @modules) = @_;
$self->run_install(
"-L", $path,
(map { ("--mirror", $_->url) } $self->effective_mirrors),
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalog/db.pm view on Meta::CPAN
sub connect { shift->instance()->connect(@_); }
sub logoff { shift->instance()->logoff(@_); }
sub insert { shift->instance()->insert(@_); }
sub dict_update { shift->instance()->dict_update(@_); }
sub mdelete { shift->instance()->mdelete(@_); }
sub update { shift->instance()->update(@_); }
sub tables { shift->instance()->tables(@_); }
sub table_exists { shift->instance()->table_exists(@_); }
sub databases { shift->instance()->databases(@_); }
sub exec_info { shift->instance()->exec_info(@_); }
sub exec { shift->instance()->exec(@_); }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/ActionRole/MatchRequestMethod.pm view on Meta::CPAN
__PACKAGE__->config(
action_roles => ['MatchRequestMethod'],
);
sub get_foo : Path Method('GET') { ... }
sub update_foo : Path Method('POST') { ... }
sub create_foo : Path Method('PUT') { ... }
sub delete_foo : Path Method('DELETE') { ... }
sub foo : Path Method('GET') Method('POST') { ... }
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/ActionRole/Tabs.pm view on Meta::CPAN
$form->action($c->uri_for('update'));
...
}
# update action uses same tab as edit action
sub update : Local Does(Tabs) TabAlias(edit) {
...
if ($form->result->has_errors) {
$stash->{template} = 'edit.tt2';
}
else {
lib/Catalyst/ActionRole/Tabs.pm view on Meta::CPAN
# action 'edit' has a Tab with label "Edit"
sub edit : Local Does(Tabs) Tab { ... }
# action 'update' has a Tab with label "Edit" too
sub update : Local Does(Tabs) TabAlias(edit) { ... }
=head1 METHODS
Normaly you never have to touch the following two methods.
They are documented here to reveal their purpose.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Controller/Atompub/Collection.pm view on Meta::CPAN
1;
}
# Update the requested Entry in the method with "Atompub(update)"
# attribute
sub update_entry :Atompub(update) {
my($self, $c) = @_;
my $uri = $c->entry_resource->uri;
# app:edited element, which was assigned by C::C::Atompub,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Controller/DBIC/API.pm view on Meta::CPAN
$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, @_ ) } );
lib/Catalyst/Controller/DBIC/API.pm view on Meta::CPAN
}
}
sub update_object_from_params {
my ( $self, $c, $object, $params ) = @_;
$params = {%$params, %{$object->ident_condition}};
my $updated_object =
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/ControllerRole/At.pm view on Meta::CPAN
sub find :At($controller/{id:Int}) { ... } # http://localhost/user/$integer
# Define an action with an HTTP Method match at the same time
sub update :Get($controller/{id:Int}) { ... } # GET http://localhost/user/$integer
__PACKAGE__->meta->make_immutable;
=head1 DESCRIPTION
lib/Catalyst/ControllerRole/At.pm view on Meta::CPAN
sub init :Via($parent) At({id:Int}/...) {
my ($self, $c) = @_;
}
sub show :Via(init) At($name) { ... }
sub update :Via(init) At($name) { ... }
sub delete :Via(init) At($name) { ... }
__PACKAGE__->meta->make_immutable;
This creates four (4) URL templates:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Helper/AuthDBIC.pm view on Meta::CPAN
$helper->mk_file("root/auth/login.tt", $login);
$helper->mk_file("root/auth/logout.tt", $logout);
$helper->mk_file("root/auth/unauth.tt", $unauth);
}
=head2 sub update_makefile()
Adds the auth and session dependencies to Makefile.PL
=cut
sub update_makefile {
my $deps = Catalyst::Helper->get_file(__PACKAGE__, 'requires');
my $doc = PPI::Document->new('Makefile.PL');
my $find = PPI::Find->new( \&_find_install_script );
my ($found) = $find->in($doc);
croak "There's something wrong with your Makefile.PL so we can't continue (can't find the install_script directive\n" if ! $found;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Manual/Intro.pod view on Meta::CPAN
package MyApp::Controller::Cart;
use base qw/Catalyst::Controller/;
sub add : Local { }
sub update : Local { }
sub order : Local { }
Note that you can also supply attributes via the Controller's config so
long as you have at least one attribute on a subref to be exported
(:Action is commonly used for this) - for example the following is
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Model/LDAP/Entry.pm view on Meta::CPAN
return $self;
}
sub update {
my $self = shift;
my $client = shift || $self->_ldap_client;
croak 'No LDAP client provided to update' unless $client;
return $self->next::method( $client, @_ );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Model/Riak.pm view on Meta::CPAN
sub read {
my($self, $data) = @_;
return $self->get($data);
}
sub update {
my($self, $data) = @_;
if ( defined($data->{key}) ) {
my $object = $self->get({ key => $data->{key} });
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Model/Search.pm view on Meta::CPAN
Catalyst::Exception->throw(
message => ( ref $self || $self ) . ' does not implement add()'
);
}
sub update {
my $self = shift;
Catalyst::Exception->throw(
message => ( ref $self || $self ) . ' does not implement update()'
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Model/XML/Feed/Item.pm view on Meta::CPAN
sub uri {
my $self = shift;
return $self->{_uri};
}
sub updated {
my $self = shift;
return $self->{_updated};
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Plugin/AtomPP.pm view on Meta::CPAN
my ($self, $c) = @_;
...
}
sub update_entry : Remote {
...
}
sub delete_entry : Remote {
...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Plugin/Authentication.pm view on Meta::CPAN
}
## this was a short lived method to update user information -
## you should use persist_user instead.
sub update_user_in_session {
my $c = shift;
return $c->persist_user;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Plugin/AutoCRUD/Controller/AJAX.pm view on Meta::CPAN
sub list : Chained('base') Args(0) {
my ($self, $c) = @_;
$c->forward($c->stash->{cpac}->{g}->{backend}, 'list');
}
sub update : Chained('base') Args(0) {
my ($self, $c) = @_;
$c->forward($c->stash->{cpac}->{g}->{backend}, 'update');
}
sub delete : Chained('base') Args(0) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Controller/CRUD.pm view on Meta::CPAN
$self->call_trigger( 'update_check', $c, $hash );
$self->call_trigger( 'update_after', $c, $model );
=cut
sub update {
my ( $this, $c, $self ) = @_;
# update already record
if ( $c->req->param('btn_update') ) {
my $model = $this->get_model( $c, $self, $c->req->param( $self->setting($c)->{primary} ) );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Plugin/Data/Pensieve.pm view on Meta::CPAN
foo => [ qw/ foo_id name bar baz / ],
},
},
);
sub update_data :Local :Args(3) {
my ($self, $c, $pk, $key, $value) = @_;
$c->pensieve->store_revisions(
some_kinda_data => $pk, {
$key => $value
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Plugin/Form/Processor.pm view on Meta::CPAN
}
sub update_from_form {
my ( $c, @rest ) = @_;
my $form = $c->form( @rest ) || return;
return
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Plugin/Session/State/Cookie.pm view on Meta::CPAN
$c->update_session_cookie( $c->make_session_cookie( $sid ) );
return $c->maybe::next::method($sid);
}
sub update_session_cookie {
my ( $c, $updated ) = @_;
unless ( $c->cookie_is_rejecting( $updated ) ) {
my $cookie_name = $c->_session_plugin_config->{cookie_name};
$c->response->cookies->{$cookie_name} = $updated;
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/SessionExpiry/Controller/Root.pm view on Meta::CPAN
my ($self, $c) = @_;
$c->session;
$c->res->output($c->session_expires);
}
sub update_session : Global {
my ($self, $c) = @_;
$c->session->{foo} ++;
$c->res->output($c->session->{foo});
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Plugin/Starch/Cookie.pm view on Meta::CPAN
This is called automatically by the C<finalize_headers> step in Catalyst. This method
is provided if you want to override the behavior.
=cut
sub update_session_cookie {
my ($c) = @_;
return if !$c->_has_sessionid();
my $cookie_name = $c->starch->cookie_name();
$c->res->cookies->{ $cookie_name } = $c->starch_state->cookie_args();
return;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/CMS/File.pm view on Meta::CPAN
B<NOTE:> This is not the same as the SVN::Class->update method!
If you want that method, use the up() alias instead.
=cut
sub update {
my $self = shift;
if ( !-s $self ) {
croak "cannot update an empty file";
}
$self->write(@_);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/CRUD/Object/RDBO.pm view on Meta::CPAN
Calls delegate->save().
=cut
sub update {
shift->delegate->save(@_);
}
=head2 delete
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/CRUD/ModelAdapter/DBIC.pm view on Meta::CPAN
Calls update() on I<dbic_object>.
=cut
sub update {
my ( $self, $c, $object ) = @_;
$object->update;
}
=head2 delete( I<context>, I<dbic_object> )
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/CRUD/Controller.pm view on Meta::CPAN
Alias for save(), just for consistency with the U in CRUD.
=cut
sub update : PathPart Chained('fetch') Args(0) {
my ( $self, $c ) = @_;
$self->save($c);
}
=head2 rm
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/ListFramework.pm view on Meta::CPAN
$c->stash->{kind} = $kind;
$c->stash->{id} = $id; # the update form adds this to the URL
$c->stash->{template} = 'detail.tt';
}
sub update :Local {
my ($self, $c, $kind, $id) = @_;
my $lf = CatalystX::ListFramework->new($kind, $c);
$lf->update_from_query({'me.id' => $id});
$c->res->redirect("/listandsearch/$kind");
}
lib/CatalystX/ListFramework.pm view on Meta::CPAN
$c->stash->{box_data} = $box_data;
return 1;
}
sub update_from_query { # Update a record. Probably called from an infobox screen
my ($self, $search) = @_;
my $c = $self->{c};
my $rs = $c->model($self->{formdef}->{model})->search($search, {}); # NB: no joins. We'll assume we're looking locally for an id
my $db_row_obj = $rs->first;
unless (ref $db_row_obj) { confess "No such object found"; }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/ActionRole/RequestModel.pm view on Meta::CPAN
extends 'Catalyst::Controller';
sub root :Chained(/root) PathPart('account') CaptureArgs(0) { }
sub update :POST Chained('root') PathPart('') Args(0) Does(RequestModel) BodyModel(AccountRequest) {
my ($self, $c, $request_model) = @_;
## Do something with the $request_model
}
sub list :GET Chained('root') PathPart('') Args(0) Does(RequestModel) QueryModel(PagingModel) {
lib/Catalyst/ActionRole/RequestModel.pm view on Meta::CPAN
=head1 DESCRIPTION
Moves creating the request model into the action class execute phase. The following two actions are essentially
the same in effect:
sub update :POST Chained('root') PathPart('') Args(0) Does(RequestModel) BodyModel(AccountRequest) {
my ($self, $c, $request_model) = @_;
## Do something with the $request_model
}
sub update :POST Chained('root') PathPart('') Args(0) {
my ($self, $c) = @_;
my $request_model = $c->model('AccountRequest');
## Do something with the $request_model
}
lib/Catalyst/ActionRole/RequestModel.pm view on Meta::CPAN
extends 'Catalyst::Controller';
sub root :Chained(/root) PathPart('account') CaptureArgs(0) { }
sub update :POST Chained('root') PathPart('') Args(0) Does(RequestModel) BodyModel() {
my ($self, $c, $request_model) = @_;
## Do something with the $request_model
}
sub list :GET Chained('root') PathPart('') Args(0) Does(RequestModel) QueryModel() {
lib/Catalyst/ActionRole/RequestModel.pm view on Meta::CPAN
sub root :Chained(/root) PathPart('account') CaptureArgs(0) { }
## You can use either ~ or ~:: to indicate 'under the current namespace'.
sub update :POST Chained('root') PathPart('') Args(0) Does(RequestModel) BodyModel(~::RequestBody) {
my ($self, $c, $request_model) = @_;
## Do something with the $request_model
}
sub list :GET Chained('root') PathPart('') Args(0) Does(RequestModel) QueryModel(~RequestQuery) {
lib/Catalyst/ActionRole/RequestModel.pm view on Meta::CPAN
content type to an available request model and throw an L<CatalystX::RequestModel::Utils::InvalidContentType>
exception if none of the available models match.
Example of an action with more than one request model, which will be matched based on request content type.
sub update :POST Chained('root') PathPart('') Args(0) Does(RequestModel) BodyModel(AccountRequestForm) RequestModel(AccountRequestJSON) {
my ($self, $c, $request_model) = @_;
## Do something with the $request_model
}
Also, if more than one model matches, you'll get an instance of each matching model.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Store/AAT/Bag.pm view on Meta::CPAN
Catmandu::NotImplemented->throw(
message => 'Adding item to store not supported.'
);
}
sub update {
my ($self, $id, $data) = @_;
Catmandu::NotImplemented->throw(
message => 'Updating item in store not supported.'
);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Path/simple.pm view on Meta::CPAN
) . "return ${data_var};";
$self->_eval_sub($body, args => $args, captures => $captures);
}
sub updater {
my ($self, %opts) = @_;
my $path = $self->split_path;
my $data_var = $self->_generate_var;
my $captures = {};
my $args = [$data_var];
view all matches for this distribution