view release on metacpan or search on metacpan
},
};
# dispatch method for Observer ( see Class::Observable )
sub update : method
{
my $this = shift;
my ( $object, $action ) = @_;
sub sub_views : method
{
my $this = shift;
}
sub update : method
{
my $this = shift;
# update yourself
sub _postinit : method
{
my $this = shift;
}
sub update_model : method
{
my $this = shift;
# call Model methods from here
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Role.pm view on Meta::CPAN
use Role;
has 'created_at' => ( default => sub { time } );
has 'updated_at' => ( default => sub { time } );
sub update_timestamp {
my $self = shift;
$self->updated_at(time);
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/Observable.pm view on Meta::CPAN
# Define an observer
package My::Observer;
sub update {
my ( $class, $object, $action ) = @_;
unless ( $action ) {
warn "Cannot operation on [", $object->id, "] without action";
return;
}
lib/Class/Observable.pm view on Meta::CPAN
# Create a class-based observer
package My::ParentRules;
sub update {
my ( $item, $action ) = @_;
if ( $action eq 'prepare_for_bed' ) {
$item->brush_teeth;
$item->wash_face;
}
lib/Class/Observable.pm view on Meta::CPAN
B<Class observer>:
package My::ObserverC;
sub update {
my ( $class, $item, $action, $params ) = @_;
return unless ( $action eq 'update' );
# ...
}
lib/Class/Observable.pm view on Meta::CPAN
sub new {
my ( $class, $type ) = @_;
return bless ( { type => $type }, $class );
}
sub update {
my ( $self, $item, $action, $params ) = @_;
return unless ( $action eq $self->{type} );
# ...
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/Publisher.pm view on Meta::CPAN
Class subscribers are notified of events via the class's C<update()> method:
package My::Subscriber;
sub update {
my ($class, $publisher, $event, @args) = @_;
if ($event eq 'reload') {
# ...
} elsif ($event eq 'refresh') {
}
lib/Class/Publisher.pm view on Meta::CPAN
Object subscribers are notified of events via the object's C<update()> method:
package My::Subscriber;
sub update {
my ($self, $publisher, $event, @args) = @_;
# ...
}
Object notifications can be routed to other methods. See C<add_subscriber()>.
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Test/Class/Refresh.pm view on Meta::CPAN
rcopy($from_dir, $to_dir);
return $to_dir;
}
sub update_temp_dir_for {
my ($test_id, $to_dir, $subdir) = @_;
$subdir ||= 'after';
my $from_dir = 't/data/' . $test_id . "/$subdir";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/User/DBI.pm view on Meta::CPAN
}
}
return @rv;
}
sub update_password {
my ( $self, $newpass, $oldpass ) = @_;
return if !$self->exists_user;
# If an old passphrase is supplied, only update if it validates.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/orMapper.pm view on Meta::CPAN
$sth->execute(@v);
$sth->finish;
}
# update
sub update{
my ($self,$p) = @_;
my ($s,@v);
$s = "update " . $p->{table} . " set " . join(',', map{push(@v,$p->{columns}->{$_});$_ = $_ . '=?'} keys %{$p->{columns}});
my ($w,@vv) = where($p);
if($w){
view all matches for this distribution
view release on metacpan or search on metacpan
files actually changed. It also suppresses logging by redirecting the
log file to /dev/null.
=cut
sub update {
my %opt;
GetOptions(\%opt, qw(quiet));
return 0 if !$opt{quiet};
if (!grep m%^-log%, @ARGV) {
splice(@ARGV, 1, 0, '-log', MSWIN ? 'NUL' : '/dev/null');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ClearPress/model.pm view on Meta::CPAN
}
$self->{_loaded} = 1;
return 1;
}
sub update {
my $self = shift;
my $pk = $self->primary_key();
if(!$pk || !$self->$pk()) {
croak q(No primary key);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Clearcase/Element.pm view on Meta::CPAN
$comment = Clearcase::setComment $comment;
return $Clearcase::CC->execute ("checkin $comment $self->{pname}");
} # checkout
sub updateElementInfo () {
my ($self) = @_;
# Get all information that can be gotten using -fmt
my $fmt =
'Attributes:%aEndAttributes:'
view all matches for this distribution
view release on metacpan or search on metacpan
t/400_create.t view on Meta::CPAN
sub find {
}
sub update {
}
}
package Test1 {
view all matches for this distribution
view release on metacpan or search on metacpan
examples/helloworld/app/lib/Dwarf/Session/Store/DBI.pm view on Meta::CPAN
my $sql =qq~INSERT INTO $sid_table ($sid_col, $data_col, $expires_col) VALUES (?, ?, ?)~;
my $sth = $dbh->prepare($sql);
$sth->execute( $session_id, $data, time() + $self->expires );
}
sub update {
my ($self, $session_id, $data) = @_;
$data = encode_base64( nfreeze($data) );
my $dbh = $self->dbh;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Code/TidyAll/CacheModel.pm view on Meta::CPAN
return unless $self->_has_cache_engine;
my $cached_value = $self->cache_engine->get( $self->cache_key );
return defined $cached_value && $cached_value eq $self->cache_value;
}
sub update {
my ($self) = @_;
return unless $self->_has_cache_engine;
$self->cache_engine->set( $self->cache_key, $self->cache_value );
$self->is_cached(1);
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Test/CodeGen/Helpers.pm view on Meta::CPAN
my @text = split /\n/ => $text;
my @expected = split /\n/ => $expected;
eq_or_diff \@text, \@expected, $message;
}
sub update_version ($) {
my $text = shift;
if ( $text =~ /\b(CodeGen::Protection::Format::\w+).*Checksum:/ ) {
my $module = $1;
my $version_re = $module->_version_re;
my $version = $module->VERSION;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Prima/CodeManager/Edit.pm view on Meta::CPAN
$self-> selection(0,0,0,0);
$self-> blockType( $blockType);
$self-> {anchor} = [ $self-> {cursorX}, $self-> {cursorY}];
}
sub update_block
{
my $self = $_[0];
return unless exists $self-> {anchor};
$self-> selection( @{$self-> {anchor}}, $self-> {cursorX}, $self-> {cursorY});
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cogit.pm view on Meta::CPAN
$ref = 'master' unless $ref;
$self->update_ref($ref, $object->sha1);
}
}
sub update_ref {
my ($self, $refname, $sha1) = @_;
my $ref = file($self->gitdir, 'refs', 'heads', $refname);
$ref->parent->mkpath;
my $ref_fh = $ref->openw;
$ref_fh->print($sha1) || die "Error writing to $ref";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Command/Run.pm view on Meta::CPAN
$$ref = $obj->error;
}
return $obj->result;
}
sub update {
use Time::localtime;
my $obj = shift;
my %args = @_;
my $command = delete $args{command};
my @command = defined $command ?
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CommitBit/Record.pm view on Meta::CPAN
return @ret;
}
sub update_all_repositories {
my $self = shift;
my $repositories = CommitBit::Model::RepositoryCollection->new;
$repositories->unlimit;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Conan/Promote/Xen.pm view on Meta::CPAN
};
return bless $args => $class;
}
sub update_image {
my $self = shift;
my ($node, $target) = @_;
print "D: Upgrading $node to $target\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Concierge/Sessions/Base.pm view on Meta::CPAN
}
# Define interface methods that must be implemented by subclasses
sub create_session { die "Subclass must implement create_session" }
sub get_session_info { die "Subclass must implement get_session_info" }
sub update_session { die "Subclass must implement update_session" }
sub delete_session { die "Subclass must implement delete_session" }
sub cleanup_sessions { die "Subclass must implement cleanup_sessions" }
sub delete_user_session { die "Subclass must implement delete_user_session" }
# Utilities
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Concierge/Users.pm view on Meta::CPAN
user => $user_data
};
}
# Update user
sub update_user {
my ($self, $user_id, $updates) = @_;
return { success => 0, message => "user_id is required" }
unless $user_id && $user_id =~ /\S/;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Concierge.pm view on Meta::CPAN
return $response;
}
# Update user data: modify user record in Users component
sub update_user_data ($self, $user_id, $update_data) {
return { success => 0, message => 'user_id is required' }
unless defined $user_id && length($user_id);
return { success => 0, message => 'update_data must be a hash reference' }
unless ref $update_data eq 'HASH';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Conclave/OTK/Backend/4store.pm view on Meta::CPAN
unless ($response->is_success) {
print STDERR "PUT failed: ", $response->status_line, "\n";
}
}
sub update {
my ($self, $sparql) = @_;
my $params = { 'update' => $sparql };
my $ua = new LWP::UserAgent(timeout => 300);
$ua->agent('perlproc/1.0');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/FileManager.pm view on Meta::CPAN
$cfg->update();
=cut
sub update($) {
my $self = shift;
# Check if config file is up-to-date
open (CFG_FILE, "<".$self->getPath) or croak "Unable to open config file [".$self->getPath."]: $!";
my @versions = $self->versions;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Hosts.pm view on Meta::CPAN
New hosts' argument may be a single scalar instead of arrayref.
=cut
sub update_host ($$%) {
my $self = shift;
my $host = shift;
my %params = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Model/CursesUI.pm view on Meta::CPAN
push @{$self->{stack}} , sub{$self->scan($scan_type,$node,$element,$idx)};
$self->{cui}->getobj('center')->focus ;
}
sub update_location {
my ($self,$node,$element,$idx) = @_ ;
my $loc = $node->location ;
$loc .= ' ' if $loc ;
$loc .= $element if defined $element ;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Model/Tk/AnyViewer.pm view on Meta::CPAN
}
return wantarray ? ( $help_frame, $widget ) : $help_frame;
}
sub update_help {
my ( $cw, $w, $help ) = @_;
# work around RT https://rt.cpan.org/Ticket/Display.html?id=67306
my $t = $cw->toplevel->cget('-title');
$w->text("\n\n=pod\n\n\n=encoding utf8\n\n$help\n\n=cut\n\n");
lib/Config/Model/Tk/AnyViewer.pm view on Meta::CPAN
$cw->update_warning($elt_obj);
return $frame;
}
sub update_warning {
my ( $cw, $elt_obj ) = @_;
my $wf = $cw->Subwidget('warn_frame');
my $ww = $cw->Subwidget('warn_widget');
my $fw = $cw->Subwidget('fix_widget');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Model/Instance.pm view on Meta::CPAN
sub save {
goto &write_back;
}
sub update {
my ($self, %args) = @_;
my $hook = sub {
my ($scanner, $data_ref,$node,@element_list) = @_;
if ($node->can('update')) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Std.pm view on Meta::CPAN
package Config::Std::Gap;
use Class::Std;
{
sub serialize { return "\n" }
sub update {}
sub extend {}
sub copy_to {}
}
package Config::Std::Comment;
lib/Config/Std.pm view on Meta::CPAN
sub append_comment {
my ($self, $new_text) = @_;
$text_of{ident $self} .= $new_text;
}
sub update {}
sub extend {}
sub copy_to {}
}
package Config::Std::Keyval;
lib/Config/Std.pm view on Meta::CPAN
}
return $serialization;
}
sub update {
my ($self, $hash_ref, $updated_ref) = @_;
my $ident = ident $self;
my $key = $key_of{$ident};
lib/Config/Std.pm view on Meta::CPAN
}
return $serialization;
}
sub update {
my ($self, $hash_ref, $updated_ref) = @_;
my $ident = ident $self;
if (!defined $hash_ref) {
$deleted_of{$ident} = 1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Confluence/Client/XMLRPC.pm view on Meta::CPAN
return '';
}
}
}
sub updatePage {
my Confluence::Client::XMLRPC $self = shift;
my $page = shift;
my $pageUpdateOptions = ( shift || {} );
if ( $self->{'_cflVersion'} ge "002010000" ) {
lib/Confluence/Client/XMLRPC.pm view on Meta::CPAN
}
}
return '';
}
sub updateOrStorePage {
my Confluence::Client::XMLRPC $self = shift;
my $newPage = shift;
my $couldUpdate = 1;
foreach my $field ( qw( id space title content version ) ) {
view all matches for this distribution