AddressBook
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/AddressBook.pm view on Meta::CPAN
$abook->update(filter=>\%filter,entry=>$entry)
\%filter is a list of cannonical attriute/value pairs used to identify the entry to
be updated.
$entry is an AddressBook::Entry object
=cut
sub update {
my $self = shift;
my $class = ref $self || croak "Not a method call.";
carp "Method not implemented"
}
=head2 add
$abook->add($entry)
lib/AddressBook/DB/DBI.pm view on Meta::CPAN
croak "Error: Don't know how to determine timestamp for this database type";
}
}
sub reset {
my $self = shift;
my $class = ref $self || croak "Not a method call";
$self->search;
}
sub update {
my $self = shift;
my $class = ref $self || croak "Not a method call.";
my %args = @_;
my $count = $self->search(filter=>$args{filter},strict=>1);
if ($count == 0){
croak "Update Error: filter did not match any entries";
} elsif ($count > 1) {
croak "Update Error: filter matched multiple entries";
}
my $filter_entry = AddressBook::Entry->new(attr=>{%{$args{filter}}},
lib/AddressBook/DB/LDAP.pm view on Meta::CPAN
}
return ParseDate($timestamp);
}
sub reset {
my $self = shift;
my $class = ref $self || croak "Not a method call";
$self->search;
}
sub update {
my $self = shift;
my $class = ref $self || croak "Not a method call";
my %args = @_;
my $count = $self->search(filter=>$args{filter});
if ($count == 0){
$self->{code} = "Update Error: filter did not match any entries";
return 0;
} elsif ($count > 1) {
$self->{code} = "Update Error: filter matched multiple entries";
return 0;
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.690 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )