File Coverage

blib/lib/App/Addex/Output.pm
Criterion Covered Total %
statement 12 13 92.3
branch n/a
condition n/a
subroutine 5 6 83.3
pod 3 3 100.0
total 20 22 90.9


line stmt bran cond sub pod time code
1 5     5   3156 use strict;
  5         10  
  5         168  
2 5     5   26 use warnings;
  5         7  
  5         212  
3              
4             package App::Addex::Output;
5             # ABSTRACT: base class for output plugins
6             $App::Addex::Output::VERSION = '0.026';
7 5     5   28 use Carp ();
  5         11  
  5         542  
8              
9             #pod =head1 DESCRIPTION
10             #pod
11             #pod This is a base class for output plugins.
12             #pod
13             #pod =head1 METHODS
14             #pod
15             #pod =head2 new
16             #pod
17             #pod my $output_plugin = App::Addex::Output->new(\%arg);
18             #pod
19             #pod This method returns a new outputter.
20             #pod
21             #pod =cut
22              
23             sub new {
24 5     5 1 13 my ($class) = @_;
25              
26 5         24 return bless {} => $class;
27             }
28              
29             #pod =head2 process_entry
30             #pod
31             #pod $output_plugin->process_entry($entry);
32             #pod
33             #pod This method is called once for each entry to be processed. It must be
34             #pod overridden in output plugin classes, or the base implementation will throw an
35             #pod exception when called.
36             #pod
37             #pod =cut
38              
39 0     0 1 0 sub process_entry { Carp::confess "process_entry method not implemented" }
40              
41             #pod =head2 finalize
42             #pod
43             #pod $output_plugin->finalize;
44             #pod
45             #pod This method is called after all entries have been processed.
46             #pod
47             #pod =cut
48              
49 1     1 1 4 sub finalize { }
50              
51             1;
52              
53             __END__
54              
55             =pod
56              
57             =encoding UTF-8
58              
59             =head1 NAME
60              
61             App::Addex::Output - base class for output plugins
62              
63             =head1 VERSION
64              
65             version 0.026
66              
67             =head1 DESCRIPTION
68              
69             This is a base class for output plugins.
70              
71             =head1 METHODS
72              
73             =head2 new
74              
75             my $output_plugin = App::Addex::Output->new(\%arg);
76              
77             This method returns a new outputter.
78              
79             =head2 process_entry
80              
81             $output_plugin->process_entry($entry);
82              
83             This method is called once for each entry to be processed. It must be
84             overridden in output plugin classes, or the base implementation will throw an
85             exception when called.
86              
87             =head2 finalize
88              
89             $output_plugin->finalize;
90              
91             This method is called after all entries have been processed.
92              
93             =head1 AUTHOR
94              
95             Ricardo SIGNES <rjbs@cpan.org>
96              
97             =head1 COPYRIGHT AND LICENSE
98              
99             This software is copyright (c) 2006 by Ricardo SIGNES.
100              
101             This is free software; you can redistribute it and/or modify it under
102             the same terms as the Perl 5 programming language system itself.
103              
104             =cut