blib/lib/File/Next/OO.pm

filter: Statementstmt 84.0% 21 / 25 Branchbran 66.6% 8 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 81.8% 36 / 44 CC 7 SCAR 15.1
CC
7
Cov
78%
dirs
7.7
new
4.0
BEGIN
1.0
CRAP 4.5
↑ Summary
1 package File::Next::OO;
2  
3 4 $VERSION = '0.04';
4 4 ▶use File::Next 0.38;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 #use warnings;
7 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 4 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 8 ▶ sub new {
Subroutine new: called CC=4 SCAR=13.9
Pod documented
12 8 ▶ shift if ref $_[1] eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $_[1] eq "HASH" 4 4 8
13 8 my $i = File::Next::files(@_);
14 7 ▶ return wantarray ? do { my @t; while( my $f = $i->() ){ push @t, $f } @t } : $i;
Branch: 2 branches
BranchTrueFalseTotal
wantarray ? : 1 6 7
if (my $f = &$i()) 17 1 18
15 }
16  
17 4 *files = *new;
18 4 *name = *File::Next::name;
19 4 *dir = *File::Next::dir;
20  
21 1 ▶ sub dirs {
Subroutine dirs: called CC=4 SCAR=20.4
Pod documented
22 1 ▶ shift if ref $_[1] eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $_[1] eq "HASH" 0 1 1
23 1 my $i = File::Next::dirs(@_);
24 0 ▶ return wantarray ? do { my @t; while( my $f = $i->() ){ push @t, $f } @t } : $i;
Branch: 2 branches
BranchTrueFalseTotal
wantarray ? : 0 1 1
if (my $f = &$i()) 0 0 0
25 }
26  
27 }
28  
29 4 1;
30 __END__
↑ Summary