File Coverage

blib/lib/Pod/Simple/Data.pm
Criterion Covered Total %
statement 26 26 100.0
branch 6 6 100.0
condition 4 5 80.0
subroutine 6 6 100.0
pod 1 1 100.0
total 43 44 97.7


line stmt bran cond sub pod time code
1             package Pod::Simple::Data;
2              
3 1     1   23701 use strict;
  1         2  
  1         35  
4 1     1   22 use 5.008_005;
  1         3  
  1         31  
5              
6 1     1   1098 use Pod::Simple ();
  1         37806  
  1         65  
7 1     1   14 use vars qw( @ISA $VERSION );
  1         2  
  1         266  
8             $VERSION = '0.01';
9             @ISA = ('Pod::Simple');
10              
11             sub new {
12 9     9 1 5775 my $self = shift;
13 9         41 my $new = $self->SUPER::new();
14 9   50     295 $new->{'output_fh'} ||= *STDOUT{IO};
15 9         37 $new->nix_X_codes(1);
16 9 100       75 push @_, '*' unless scalar(@_);
17 9         38 $new->accept_targets(@_);
18 9         151 return $new;
19             }
20              
21             sub _handle_text {
22 22     22   11688 my $para = $_[0]{'curr_open'}->[-1];
23 22 100 100     101 if (defined $para && $para->[0] eq '=for') {
24 20         24 print {$_[0]{'output_fh'}} $_[1];
  20         76  
25 20 100       188 print {$_[0]{'output_fh'}} "\n" unless $_[1] =~ /\n$/;
  19         61  
26             }
27 22         153 return;
28             }
29              
30             1;
31             __END__