App-Addex
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/App/Addex.pm view on Meta::CPAN
#pod initialize the plugin before use.
#pod
#pod =cut
# sub starting_section_name { 'classes' }
sub mvp_multivalue_args { qw(output plugin) }
sub new {
my ($class, $arg) = @_;
my $self = bless {} => $class;
# XXX: keep track of seen/unseen classes; carp if some go unused?
# -- rjbs, 2007-04-06
for my $core (qw(addressbook)) {
my $class = $arg->{classes}{$core}
or Carp::confess "no $core class provided";
$self->{$core} = $self->_initialize_plugin($class, $arg->{$class});
}
lib/App/Addex/AddressBook.pm view on Meta::CPAN
#pod
#pod Valid arguments are:
#pod
#pod addex - required; the App::Addex object using this address book
#pod
#pod =cut
sub new {
my ($class, $arg) = @_;
Carp::croak "no addex argument provided" unless $arg->{addex};
bless { addex => $arg->{addex} } => $class;
}
#pod =method addex
#pod
#pod my $addex = $addr_book->addex;
#pod
#pod This returns the App::Addex object with which the address book is associated.
#pod
#pod =cut
lib/App/Addex/Entry.pm view on Meta::CPAN
sub new {
my ($class, $arg) = @_;
# XXX: do some validation -- rjbs, 2007-04-06
my $self = {
name => $arg->{name},
nick => $arg->{nick},
emails => $arg->{emails},
};
bless $self => $class;
$self->field(%{ $arg->{fields} }) if $arg->{fields};
return $self;
}
#pod =method name
#pod
#pod =method nick
#pod
lib/App/Addex/Entry/EmailAddress.pm view on Meta::CPAN
sub new {
my ($class, $arg) = @_;
$arg = { address => $arg } if not ref $arg;
undef $arg->{label} if defined $arg->{label} and not length $arg->{label};
for (qw(sends receives)) {
$arg->{$_} = 1 unless exists $arg->{$_};
}
bless $arg => $class;
}
#pod =method address
#pod
#pod This method returns the email address as a string.
#pod
#pod =cut
use overload '""' => 'address';
lib/App/Addex/Output.pm view on Meta::CPAN
#pod
#pod my $output_plugin = App::Addex::Output->new(\%arg);
#pod
#pod This method returns a new outputter.
#pod
#pod =cut
sub new {
my ($class) = @_;
return bless {} => $class;
}
#pod =head2 process_entry
#pod
#pod $output_plugin->process_entry($entry);
#pod
#pod This method is called once for each entry to be processed. It must be
#pod overridden in output plugin classes, or the base implementation will throw an
#pod exception when called.
#pod
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.007 second using v1.00-cache-2.02-grep-82fe00e-cpan-a086c87fca4 )