Markdent/CheckedOutput.pm

filter: Statementstmt 100% 18 / 18 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 2 totaltotal 92.5% 25 / 27 CC 2 SCAR 2.9
CC
2
Cov
100%
print
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Markdent/Simple/Document.pm ↑ Summary Markdent/Role/FilterHandler.pm »
1 package Markdent::CheckedOutput;
2  
3 34 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 34 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 34 our $VERSION = '0.41';
7  
8 5 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
9 5 my $class = shift;
10 5 my $output = shift;
11  
12 5 return bless \$output, $class;
13 }
14  
15 ## no critic (Subroutines::ProhibitBuiltinHomonyms)
16 93 ▶sub print {
Subroutine print: called CC=2 SCAR=6.9
Pod undocumented
17 93 my $self = shift;
18  
19 # We don't need warnings from IO::* about printing to closed handles when
20 # we'll die in that case anyway.
21 #
22 ## no critic (TestingAndDebugging::ProhibitNoWarnings)
23 34 ▶ no warnings 'io';
Subroutine BEGIN: called CC=1 SCAR=0.0
24 ## use critic
25 93 ▶ print { ${$self} } @_ or die "Cannot write to handle: $!";
Branch: 1 branch
BranchTrueFalseTotal
print {${$self;};} @_ or die "Cannot write to handle: $!" 91 2 93
26 }
27 ## use critic
28  
29 34 1;
30  
31 # ABSTRACT: This class has no user-facing parts
32  
33 __END__
« Markdent/Simple/Document.pm ↑ Summary Markdent/Role/FilterHandler.pm »