File Coverage

blib/lib/Pod/Markdown/Passthrough.pm
Criterion Covered Total %
statement 20 20 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 3 3 100.0
total 30 30 100.0


line stmt bran cond sub pod time code
1             package Pod::Markdown::Passthrough;
2 2     2   22105 use 5.008001;
  2         7  
3 2     2   11 use strict;
  2         3  
  2         73  
4 2     2   19 use warnings;
  2         3  
  2         64  
5              
6 2     2   8 use base 'Pod::Markdown';
  2         4  
  2         2022  
7              
8             our $VERSION = "0.01";
9              
10             sub new {
11 1     1 1 15 my $class = shift;
12              
13 1         4 bless {}, $class;
14             }
15              
16             # Read the contents of a file and stash in object.
17             sub parse_from_file {
18 1     1 1 764 my $self = shift;
19 1         3 my $file = shift;
20              
21 1         2 $self->{_markdown} = do { local ( @ARGV, $/ ) = $file; <> };
  1         4  
  1         51  
22              
23             }
24              
25             # Return any stashed raw file content.
26             sub as_markdown {
27 1     1 1 6 my $self = shift;
28              
29 1         3 return $self->{_markdown};
30              
31             }
32              
33             1;
34             __END__