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   79173 use strict;
  2         4  
  2         70  
3 2     2   10 use warnings;
  2         6  
  2         86  
4 2     2   10 use Carp ();
  2         3  
  2         38  
5 2     2   508 use Pod::Simple ();
  2         4  
  2         650  
6             our $VERSION = '3.48';
7             our @ISA = ('Pod::Simple');
8              
9             sub new {
10 5     5 1 148855 my $self = shift;
11 5         29 my $new = $self->SUPER::new(@_);
12 5   50     35 $new->{'output_fh'} ||= *STDOUT{IO};
13 5         38 $new->nix_X_codes(1);
14 5         10 return $new;
15             }
16              
17             #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18              
19             sub _handle_element_start {
20 1316 100   1316   2543 print {$_[0]{'output_fh'}} "\n" unless $_[1] =~ m/^[A-Z]$/s;
  765         2134  
21 1316         1682 return;
22             }
23              
24             sub _handle_text {
25 1774     1774   3493 $_[1] =~ s/$Pod::Simple::shy//g;
26 1774         2480 $_[1] =~ s/$Pod::Simple::nbsp/ /g;
27 1774         1803 print {$_[0]{'output_fh'}} $_[1];
  1774         2681  
28 1774         3064 return;
29             }
30              
31             sub _handle_element_end {
32 1316 100   1316   2296 print {$_[0]{'output_fh'}} "\n" unless $_[1] =~ m/^[A-Z]$/s;
  765         1196  
33 1316         1669 return;
34             }
35              
36             #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
37             1;
38              
39              
40             __END__