File Coverage

blib/lib/Pod/Simple/TextContent.pm
Criterion Covered Total %
statement 28 28 100.0
branch 4 4 100.0
condition 1 2 50.0
subroutine 8 8 100.0
pod 1 1 100.0
total 42 43 97.6


line stmt bran cond sub pod time code
1             package Pod::Simple::TextContent;
2 2     2   141095 use strict;
  2         3  
  2         73  
3 2     2   9 use warnings;
  2         11  
  2         110  
4 2     2   10 use Carp ();
  2         4  
  2         53  
5 2     2   740 use Pod::Simple ();
  2         6  
  2         661  
6             our $VERSION = '3.47';
7             our @ISA = ('Pod::Simple');
8              
9             sub new {
10 5     5 1 257313 my $self = shift;
11 5         43 my $new = $self->SUPER::new(@_);
12 5   50     46 $new->{'output_fh'} ||= *STDOUT{IO};
13 5         26 $new->nix_X_codes(1);
14 5         14 return $new;
15             }
16              
17             #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18              
19             sub _handle_element_start {
20 1316 100   1316   3977 print {$_[0]{'output_fh'}} "\n" unless $_[1] =~ m/^[A-Z]$/s;
  765         3583  
21 1316         2515 return;
22             }
23              
24             sub _handle_text {
25 1774     1774   6032 $_[1] =~ s/$Pod::Simple::shy//g;
26 1774         3383 $_[1] =~ s/$Pod::Simple::nbsp/ /g;
27 1774         2264 print {$_[0]{'output_fh'}} $_[1];
  1774         4629  
28 1774         4470 return;
29             }
30              
31             sub _handle_element_end {
32 1316 100   1316   3943 print {$_[0]{'output_fh'}} "\n" unless $_[1] =~ m/^[A-Z]$/s;
  765         1860  
33 1316         2316 return;
34             }
35              
36             #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
37             1;
38              
39              
40             __END__