lib/Pod/Perldoc/ToMarkdown.pm

filter: Statementstmt 100% 18 / 18 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 96.3% 26 / 27 CC 2 SCAR 3.0
CC
2
Cov
95%
parse_from_file
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« script/pod2markdown ↑ Summary
1 #
2 # This file is part of Pod-Markdown
3 #
4 # This software is copyright (c) 2011 by Randy Stauner.
5 #
6 # This is free software; you can redistribute it and/or modify it under
7 # the same terms as the Perl 5 programming language system itself.
8 #
9 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 package Pod::Perldoc::ToMarkdown;
13 2 our $AUTHORITY = 'cpan:RWSTAUNER';
14 2 $Pod::Perldoc::ToMarkdown::VERSION = '3.400';
15 # ABSTRACT: Enable `perldoc -o Markdown`
16  
17 2 ▶use parent qw(Pod::Markdown);
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
20 1 my $class = shift;
21 1 my $self = $class->SUPER::new(
22 # Pod::Perldoc does not pass any options by default
23 # but will call setters if attributes are passed on command line.
24 # I don't know what encoding it expects, but it needs one, so default to UTF-8.
25 output_encoding => 'UTF-8',
26 @_,
27 );
28 1 return $self;
29 }
30  
31 1 ▶sub parse_from_file {
Subroutine parse_from_file: called CC=2 SCAR=7.1
Pod documented
32 1 my $self = shift;
33 # Instantiate if called as a class method.
34 1 ▶ $self = $self->new if !ref $self;
Branch: 1 branch
BranchTrueFalseTotal
unless ref $self 1 0 1
35  
36 # Skip over SUPER's override and go up to grandpa's method.
37 1 $self->Pod::Simple::parse_from_file(@_);
38 }
39  
40 # There are several other methods that we could implement that Pod::Perldoc
41 # finds interesting:
42 # * output_is_binary
43 # * name
44 # * output_extension
45  
46 2 1;
47  
48 __END__
« script/pod2markdown ↑ Summary