File Coverage

blib/lib/OPP/Output.pm
Criterion Covered Total %
statement 9 19 47.3
branch 0 2 0.0
condition n/a
subroutine 3 6 50.0
pod 0 3 0.0
total 12 30 40.0


line stmt bran cond sub pod time code
1             #
2             # $Id: Output.pm,v cfbea05b0bc4 2025/01/28 15:06:19 gomor $
3             #
4             package OPP::Output;
5 1     1   813 use strict;
  1         3  
  1         45  
6 1     1   6 use warnings;
  1         2  
  1         85  
7              
8             our $VERSION = '1.00';
9              
10 1     1   7 use base qw(OPP);
  1         2  
  1         335  
11              
12             our @AS = qw(
13             docs
14             );
15             __PACKAGE__->cgBuildIndices;
16             __PACKAGE__->cgBuildAccessorsScalar(\@AS);
17              
18             sub init {
19 0     0 0   my $self = shift;
20              
21 0           $self->docs([]);
22              
23 0           return $self;
24             }
25              
26             sub add {
27 0     0 0   my $self = shift;
28 0           my ($doc) = @_;
29              
30 0 0         $doc = ref($doc) eq 'ARRAY' ? $doc : [ $doc ];
31              
32 0           return push @{$self->docs}, @$doc;
  0            
33             }
34              
35             sub flush {
36 0     0 0   my $self = shift;
37              
38 0           return $self->docs([]);
39             }
40              
41             1;
42              
43             __END__