App-Addex
view release on metacpan or search on metacpan
lib/App/Addex/Output.pm view on Meta::CPAN
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
#pod =cut
sub process_entry { Carp::confess "process_entry method not implemented" }
#pod =head2 finalize
#pod
#pod $output_plugin->finalize;
#pod
lib/App/Addex/Output.pm view on Meta::CPAN
my $output_plugin = App::Addex::Output->new(\%arg);
This method returns a new outputter.
=head2 process_entry
$output_plugin->process_entry($entry);
This method is called once for each entry to be processed. It must be
overridden in output plugin classes, or the base implementation will throw an
exception when called.
=head2 finalize
$output_plugin->finalize;
This method is called after all entries have been processed.
=head1 AUTHOR
t/addr-book.t view on Meta::CPAN
#!perl
use strict;
use warnings;
use Test::More tests => 2;
my $class = 'App::Addex::AddressBook';
use_ok($class);
eval { $class->entries };
like($@, qr/no behavior defined/, "exception thrown on virtual method");
$addex->run;
is(@calls, 6, "callback called twice");
eval { App::Addex->new; };
like(
$@,
qr/no addressbook class/,
"exception thrown when no addressbook class given",
);
eval {
App::Addex->new({
classes => { addressbook => 'App::Addex::AddressBook::Test' }
});
};
like(
$@,
qr/no output class/,
"exception thrown when no output classes given",
);
eval {
App::Addex->new({
classes => {
addressbook => 'App::Addex::AddressBook::Test',
output => [ 'App::Addex::FailsToLoad' ],
}
});
};
( run in 0.301 second using v1.01-cache-2.11-cpan-496ff517765 )