Docker.pm

filter: Statementstmt 67.6% 23 / 34 Branchbran 0.0% 0 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 77.7% 7 / 9 Podpod 0.0% 0 / 1 totaltotal 53.5% 30 / 56 CC 7 SCAR 28.9
CC
7
Cov
50%
get_dir_files
42.0
__ANON__
6.0
BEGIN
1.0
CRAP 18.1
« Docker/RequestRawStream.pm ↑ Summary Docker/Image.pm »
1 package Eixo::Docker;
2  
3 1 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use Eixo::Base::Clase;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use JSON;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Net::HTTP;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Eixo::Rest::Client;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12  
13 # Items to export into callers namespace by default. Note: do not export
14 # names by default without a very good reason. Use EXPORT_OK instead.
15 # Do not simply export all your public functions/methods/constants.
16  
17 1 our $VERSION = '1.211';
18  
19 0 ▶our $IDENTITY_FUNC = sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
20  
21 0 ▶ (wantarray)? @_ : $_[0];
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
22  
23 1 };
24  
25  
26 0 ▶sub get_dir_files{
Subroutine get_dir_files: not called CC=6 SCAR=37.4
Pod undocumented
27 0 my $dir = $_[0];
28
29 0 ▶ die("dir path specified doesn't exists") unless(-d $dir);
Branch: 1 branch
BranchTrueFalseTotal
unless -d $dir 0 0 0
30
31 0 ▶ opendir(my $fh_dir, $dir) || die("Error opening dir $dir:$!");
Branch: 1 branch
BranchTrueFalseTotal
opendir my $fh_dir, $dir or die "Error opening dir ${dir}:$!" 0 0 0
32
33 0 my @list;
34
35 0 ▶ while(my $file = readdir($fh_dir)){
Branch: 1 branch
BranchTrueFalseTotal
if (defined(my $file = readdir $fh_dir)) 0 0 0
36
37 0 ▶ next if($file =~ /^\.+$/);
Branch: 1 branch
BranchTrueFalseTotal
if $file =~ /^\.+$/ 0 0 0
38
39 0 push @list, "$dir/$file";
40
41 0 ▶ push @list, get_dir_files("$dir/$file") if(-d "$dir/$file");
Branch: 1 branch
BranchTrueFalseTotal
if -d "$dir/$file" 0 0 0
42
43 }
44
45 0 closedir($fh_dir);
46
47 0 return @list;
48 }
49  
50 1 1;
« Docker/RequestRawStream.pm ↑ Summary Docker/Image.pm »