view release on metacpan or search on metacpan
t/36_hooks.t view on Meta::CPAN
# hooks : just count the commits / rollbacks / updates
my ($n_commits, $n_rollbacks, $n_updates, @update_args);
sub commit_hook { $n_commits += 1; return 0; }
sub rollback_hook { $n_rollbacks += 1; return 0; }
sub update_hook { $n_updates += 1;
@update_args = @_; }
my $sql_count_rows = "SELECT COUNT(foo) FROM hook_test";
foreach my $call_func (@CALL_FUNCS) {
view all matches for this distribution
view release on metacpan or search on metacpan
t/36_hooks.t view on Meta::CPAN
# hooks : just count the commits / rollbacks / updates
my ($n_commits, $n_rollbacks, $n_updates, @update_args);
sub commit_hook { $n_commits += 1; return 0; }
sub rollback_hook { $n_rollbacks += 1; return 0; }
sub update_hook { $n_updates += 1;
@update_args = @_; }
my $sql_count_rows = "SELECT COUNT(foo) FROM hook_test";
foreach my $call_func (@CALL_FUNCS) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JSprite.pm view on Meta::CPAN
$errdetails = $query;
return (-503);
}
}
sub update
{
my ($self, $query) = @_;
my ($i, $path, $regex, $table, $extra, $condition, $all_columns,
$columns, $status);
my ($psuedocols) = "CURRVAL|NEXTVAL";
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
$examples =~ s/\r\n/\n/g;
update_file( 'lib/WWW/Mechanize/Chrome/Examples.pm', $examples );
};
};
sub update_file {
my( $filename, $new_content ) = @_;
my $content;
if( -f $filename ) {
open my $fh, '<', $filename
or die "Couldn't read '$filename': $!";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/XBase.pm view on Meta::CPAN
$self->set_record($num, map { $data{$_} } $self->field_names );
}
# Write record, fields specified as hash, unspecified will be
# unchanged
sub update_record_hash {
my ($self, $num) = ( shift, shift );
$self->NullError();
my %olddata = $self->get_record_hash($num);
return unless %olddata;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBD/DBM.pm view on Meta::CPAN
my ( $self, $data, $aryref ) = @_;
my $meta = $self->{meta};
delete $meta->{hash}->{ $aryref->[0] };
}
sub update_one_row ($$$)
{
my ( $self, $data, $aryref ) = @_;
my $meta = $self->{meta};
my $key = shift @$aryref;
defined $key or return;
my $row = ( ref($aryref) eq 'ARRAY' ) ? $aryref : [$aryref];
$meta->{hash}->{$key} = $meta->{dbm_mldbm} ? $row : $row->[0];
}
sub update_specific_row ($$$$)
{
my ( $self, $data, $aryref, $origary ) = @_;
my $meta = $self->{meta};
my $key = shift @$origary;
my $newkey = shift @$aryref;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBICx/Hooks.pm view on Meta::CPAN
$ret;
}
sub update {
my $self = shift;
my $ret = $self->next::method(@_);
$_->($self) for dbic_hooks_for($self, 'update');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBICx/MaterializedPath.pm view on Meta::CPAN
$self->next::method(@_);
$self->set_materialized_path;
$self->update;
}
sub update :method {
my $self = shift;
my %to_update = $self->get_dirty_columns;
my $parent_column = $self->parent_column;
$self->next::method(@_);
return $self unless $to_update{$parent_column};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBICx/Modeler/Model/Source.pm view on Meta::CPAN
my $storage = $rs->create( $given );
$storage->discard_changes if $self->create_refresh && $storage->can( 'discard_changes' );
return $self->inflate( _model__storage => $storage, @_ );
}
sub update_or_create {
my $self = shift;
my $given = shift;
my $rs = $self->schema->resultset( $self->moniker );
my $storage = $rs->update_or_create( $given );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Abstract.pm view on Meta::CPAN
$self->__logwrite_sql( 1, $sql, @bind_params );
$self->__mod_query( $sql, @bind_params );
return $self;
}
sub update {
my $self = shift;
my ($table, $fields, $where ) = @_;
# $table == Name of table to update
# $fields == A reference to a hash of field/value pairs containing the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/ActiveRecord/Arel.pm view on Meta::CPAN
my $o = $self->clone;
$o->{query} = DBIx::ActiveRecord::Arel::Query::Insert->new($self, $hash, $columns);
$o;
}
sub update {
my ($self, $hash, $columns) = @_;
my $o = $self->clone;
$o->{query} = DBIx::ActiveRecord::Arel::Query::Update->new($self, $hash, $columns);
$o;
}
view all matches for this distribution
view release on metacpan or search on metacpan
example/DB/Default.pm view on Meta::CPAN
($p{include_expired} ? "" : "AND WebItem.date_expires > now()"),
(@bind ? (bind => \@bind) : ()),
);
}
sub update_announce {
my $self = shift;
my %p = @_;
$p{expires} = $self->sql_date_struct($p{expires});
$p{live} = $self->sql_date_struct($p{live});
view all matches for this distribution
view release on metacpan or search on metacpan
}
#
# update: update a row in the main table.
#
sub update {
my $self = shift;
my $rec = shift;
my $where = shift;
my @fields = $self->fields;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/AuditLog.pm view on Meta::CPAN
}
return $result;
}
sub update {
my $self = shift;
return $self->next::method(@_) if !$enabled;
my $stored_row = $self->get_from_storage;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/BatchUpdate/Batch.pm view on Meta::CPAN
has pk_column => ( is => "ro", required => 1 );
has ids => ( is => "lazy" );
sub _build_ids { [] }
sub update {
my $self = shift;
$self->resultset
->search({ $self->pk_column => { -in => $self->ids } })
->update( $self->key_value );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/BcryptColumn.pm view on Meta::CPAN
my $self = shift;
$self->_bcrypt_set_columns;
$self->next::method(@_);
}
sub update {
my ($self, $upd, @rest) = @_;
if (ref $upd) {
my @columns = $self->bcrypt_columns;
foreach my $column (@columns) {
next unless exists $upd->{$column};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/ResultSet/BitField.pm view on Meta::CPAN
return $self->search({ $type => $query });
}
sub update {
my ($self, $data, @rest) = @_;
my $source = $self->result_source;
my $row = $self->new_result({});
while(my ($k, $value) = each %{$data || {}}) {
my $info = $source->column_info($k);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/CompressColumns.pm view on Meta::CPAN
=item update
=cut
sub update {
my ( $self, $upd, @rest ) = @_;
if ( ref $upd ) {
for my $col ( @{$self->compress_auto_columns} ) {
$upd->{$col} = compress($upd->{$col},9) if ( exists $upd->{$col} );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/DigestColumns.pm view on Meta::CPAN
=item update
=cut
sub update {
my ( $self, $upd, @rest ) = @_;
if ( ref $upd ) {
for my $col ( @{$self->digest_auto_columns} ) {
$self->set_column($col => delete $upd->{$col})
if ( exists $upd->{$col} );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/DynamicDefault.pm view on Meta::CPAN
}
return $self->next::method(@_);
}
sub update {
my ($self, $upd) = @_;
$self->set_inflated_columns($upd) if $upd;
my %dirty = $self->get_dirty_columns;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Events.pm view on Meta::CPAN
$self->event( insert => { details => \%inserted } );
return $self;
};
sub update {
my ( $self, @args ) = @_;
# Do this here instead of letting our parent do it
# so that we can use get_dirty_columns.
$self->set_inflated_columns(@args) if @args;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/FromSledge.pm view on Meta::CPAN
}
return $rs->create($cols);
}
sub update_from_sledge {
my ($self, $page, $args) = @_;
croak "error detected at validator" if $page->valid->is_error;
for my $col ($self->result_source->columns) {
if ($page->valid->{PLAN}->{$col}) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/FromValidators.pm view on Meta::CPAN
return $self->create($cols);
}
}
sub update_from_fv {
my ($self, $results, $args) = @_;
croak "pass me a form results object" unless blessed($results);
croak "pass me a object which can call 'success' and 'valid'"
unless $results->can('success') and $results->can('valid');
croak "has error on form" unless $results->success;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/FrozenColumns.pm view on Meta::CPAN
=head2 update
=cut
sub update {
my $self = shift;
$self->_dirty_frozen_columns(undef);
$self->next::method(@_);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Helper/ResultSet/DateMethods1.pm view on Meta::CPAN
if $self->_resolved_attrs->{_DBICH_DM1};
return $self->next::method(@_);
}
sub update {
my $self = shift;
$self = $self->as_subselect_rs
if $self->_resolved_attrs->{_DBICH_DM1};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/I18NColumns.pm view on Meta::CPAN
=head2 update
Overloaded L<DBIx::Class::Row/update> to manage i18n columns cleanly.
=cut
sub update {
my $self = shift;
$self->next::method( @_ );
if ( $self->_i18n_column_row ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Indexed.pm view on Meta::CPAN
Sends the object to the indexer's C<update> method, if C<index_on_update> is true.
=cut
sub update {
my $self = shift;
my $result = $self->next::method( @_ );
if ( $self->index_on_update and my $indexer = $self->indexer ) {
$indexer->update( $self, @_ );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Class/Admin.pm view on Meta::CPAN
update takes the name of a resultset from the schema_class, a hashref of data to update and
a where hash used to form the search for the rows to update.
=cut
sub update {
my ($self, $rs, $set, $where) = @_;
$rs ||= $self->resultset();
$where ||= $self->where();
$set ||= $self->set();
view all matches for this distribution