lib/Pod/Perldoc/ToPod.pm

filter: Statementstmt 46.6% 14 / 30 Branchbran 0.0% 0 / 14 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 44.4% 4 / 9 Podpod 0.0% 0 / 5 totaltotal 28.5% 18 / 63 CC 9 SCAR 35.6
CC
9
Cov
30%
parse_from_file
72.0
new
6.0
is_pageable
2.0
CRAP 35.2
« lib/Pod/Perldoc/ToTk.pm ↑ Summary lib/Pod/Perldoc/BaseTo.pm »
1 package Pod::Perldoc::ToPod;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use parent qw(Pod::Perldoc::BaseTo);
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 $VERSION = '3.28';
8  
9 0 ▶sub is_pageable { 1 }
Subroutine is_pageable: not called CC=1 SCAR=6.9
Pod undocumented
10 0 ▶sub write_with_binmode { 0 }
Subroutine write_with_binmode: not called CC=1 SCAR=6.9
Pod undocumented
11 0 ▶sub output_extension { 'pod' }
Subroutine output_extension: not called CC=1 SCAR=6.9
Pod undocumented
12  
13 0 ▶sub new { return bless {}, ref($_[0]) || $_[0] }
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
Condition0%0/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
14  
15 0 ▶sub parse_from_file {
Subroutine parse_from_file: not called CC=8 SCAR=42.8
Pod undocumented
16 0 my( $self, $in, $outfh ) = @_;
17  
18 0 ▶ open(IN, "<", $in) or $self->die( "Can't read-open $in: $!\nAborting" );
Branch: 1 branch
BranchTrueFalseTotal
open IN, "<", $in or $self->die("Can't read-open ${in}: $!\nAborting") 0 0 0
19  
20 0 my $cut_mode = 1;
21  
22 # A hack for finding things between =foo and =cut, inclusive
23 0 local $_;
24 0 ▶ while (<IN>) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined($_ = readline IN)) 0 0 0
25 0 ▶ if( m/^=(\w+)/s ) {
Branch: 1 branch
BranchTrueFalseTotal
if (/^=(\w+)/s) 0 0 0
26 0 ▶ if($cut_mode = ($1 eq 'cut')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($cut_mode = $1 eq "cut") 0 0 0
27 0 print $outfh "\n=cut\n\n";
28 # Pass thru the =cut line with some harmless
29 # (and occasionally helpful) padding
30 }
31 }
32 0 ▶ next if $cut_mode;
Branch: 1 branch
BranchTrueFalseTotal
if $cut_mode 0 0 0
33 0 ▶ print $outfh $_ or $self->die( "Can't print to $outfh: $!" );
Branch: 1 branch
BranchTrueFalseTotal
print $outfh $_ or $self->die("Can't print to ${outfh}: $!") 0 0 0
34 }
35  
36 0 ▶ close IN or $self->die( "Can't close $in: $!" );
Branch: 1 branch
BranchTrueFalseTotal
close IN or $self->die("Can't close ${in}: $!") 0 0 0
37 0 return;
38 }
39  
40 1 1;
41 __END__
« lib/Pod/Perldoc/ToTk.pm ↑ Summary lib/Pod/Perldoc/BaseTo.pm »