GitMeta/SshDir.pm

filter: Statementstmt 61.5% 16 / 26 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 56.7% 21 / 37 CC 3 SCAR 16.3
CC
3
Cov
53%
expand
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 5.1
« GitMeta.pm ↑ Summary GitMeta/Github.pm »
1 ###########################################
2 package GitMeta::SshDir;
3 ###########################################
4 # 2010, Mike Schilli <m@perlmeister.com>
5 ###########################################
6 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use base qw(GitMeta);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Sysadm::Install qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Log::Log4perl qw(:easy);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 ###########################################
13 0 ▶sub expand {
Subroutine expand: not called CC=3 SCAR=24.8
Pod undocumented
14 ###########################################
15 0 my($self) = @_;
16  
17 0 my $ssh = "ssh";
18 0 ▶ $ssh = $ENV{GIT_SSH} if defined $ENV{GIT_SSH};
Branch: 1 branch
BranchTrueFalseTotal
if defined $ENV{"GIT_SSH"} 0 0 0
19  
20 0 $self->param_check("host", "dir");
21  
22 0 INFO "Retrieving repos ",
23 "from $self->{host}";
24  
25 my($stdout) = tap $ssh, $self->{host},
26 0 "ls", $self->{dir};
27  
28 0 my @repos = ();
29  
30 0 ▶ while( $stdout =~ /(.*)\n/g ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($stdout =~ /(.*)\n/g) 0 0 0
31 0 push @repos,
32 "$self->{host}:$self->{dir}/$1";
33 }
34  
35 0 return @repos;
36 }
37  
38 1 1;
39  
40 __END__
« GitMeta.pm ↑ Summary GitMeta/Github.pm »