Parts/Common.pm

filter: Statementstmt 100% 21 / 21 Branchbran 100% 6 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 2 / 2 totaltotal 100% 36 / 36 CC 4 SCAR 5.9
CC
4
Cov
100%
lines
3.0
chomped_lines
2.0
BEGIN
1.0
CRAP 1.8
« Parts.pm ↑ Summary Parts/Perl.pm »
1 package Run::Parts::Common;
2  
3 # ABSTRACT: Common helpers for Run::Parts and its backends
4  
5 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 5 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 5 ▶use Exporter::Easy ( EXPORT => [qw[lines chomped_lines]] );
Subroutine BEGIN: called CC=1 SCAR=0.0
10 5 ▶use Scalar::Util qw(blessed);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 5 our $VERSION = '0.09'; # VERSION generated by DZP::OurPkgVersion
13  
14  
15 65 ▶sub lines {
Subroutine lines: called CC=3 SCAR=11.0
Pod documented
16 # Sanity check
17 65 ▶ die "lines is no method" if blessed $_[0];
Branch: 1 branch
BranchTrueFalseTotal
if builtin::blessed($_[0]) 1 64 65
18  
19 64 ▶ return wantarray ? @_ : join("\n", @_)."\n";
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 34 30 64
20 }
21  
22  
23 27 ▶sub chomped_lines {
Subroutine chomped_lines: called CC=2 SCAR=6.9
Pod documented
24 # Sanity check
25 27 ▶ die "chomped_lines is no method" if blessed $_[0];
Branch: 1 branch
BranchTrueFalseTotal
if builtin::blessed($_[0]) 1 26 27
26  
27 26 chomp(@_);
28 26 return lines(@_);
29 }
30  
31  
32  
33  
34 5 23; # End of Run::Parts::Common
35  
36 __END__
« Parts.pm ↑ Summary Parts/Perl.pm »