lib/App/gh.pm

filter: Statementstmt 68.7% 22 / 32 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 66.6% 6 / 9 Podpod 0.0% 0 / 3 totaltotal 46.6% 28 / 60 CC 6 SCAR 29.3
CC
6
Cov
50%
github
42.0
config
2.0
git
2.0
CRAP 18.7
« lib/App/gh/Command.pm ↑ Summary blib/lib/App/gh/Command/Issue/Comment.pm »
1 package App::gh;
2 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 our $VERSION = '0.66';
5 2 ▶use App::gh::Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use App::gh::API;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use Net::GitHub;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use Cwd;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 require App::gh::Git;
10  
11 2 my $GITHUB;
12  
13 0 ▶sub config {
Subroutine config: not called CC=1 SCAR=6.9
Pod undocumented
14 0 return "App::gh::Config";
15 }
16  
17 0 ▶sub git {
Subroutine git: not called CC=1 SCAR=6.9
Pod undocumented
18 0 return App::gh::Git->repository;
19 }
20  
21 0 ▶sub github {
Subroutine github: not called CC=6 SCAR=37.4
Pod undocumented
22 0 my $class = shift;
23 0 my $access_token = $class->config->github_access_token;
24 0 ▶ return $GITHUB ||= Net::GitHub->new( access_token => $access_token ) if $access_token;
Branch: 1 branch
BranchTrueFalseTotal
if $access_token 0 0 0
Condition0%0/3
$GITHUB ||= "Net::GitHub"->new("access_token", $access_token)
l!l&&r!l&&!r
000
MC/DC0%0/2
$GITHUB ||= "Net::GitHub"->new("access_token", $access_token)
$GITHUB "Net::GitHub"->new("access_token", $access_token)
Truth table0%0/3
A ||= B
A= $GITHUBB= "Net::GitHub"->new("access_token", $access_token)
ABresult
1X1
011
000
25  
26 0 my $github_id = $class->config->github_id;
27 0 my $github_password = $class->config->github_password;
28  
29 0 ▶ die "Please configure your github.user in .gitconfig (see App::gh pod)\n"
Branch: 1 branch
BranchTrueFalseTotal
unless $github_id 0 0 0
30 unless $github_id;
31 0 ▶ die "Please configure your github.password in .gitconfig (See App::gh pod)\n"
Branch: 1 branch
BranchTrueFalseTotal
unless $github_password 0 0 0
32 unless $github_password;
33  
34 0 ▶ return $GITHUB ||= Net::GitHub->new( # Net::GitHub::V3
Condition0%0/3
$GITHUB ||= "Net::GitHub"->new("login", $github_id, "pass", $github_password)
l!l&&r!l&&!r
000
MC/DC0%0/2
$GITHUB ||= "Net::GitHub"->new("login", $github_id, "pass", $github_password)
$GITHUB "Net::GitHub"->new("login", $github_id, "pass", $github_password)
Truth table0%0/3
A ||= B
A= $GITHUBB= "Net::GitHub"->new("login", $github_id, "pass", $github_password)
ABresult
1X1
011
000
35 login => $github_id,
36 pass => $github_password,
37 # $class->config->github_token,
38 );
39 }
40  
41 2 1;
42 __END__
« lib/App/gh/Command.pm ↑ Summary blib/lib/App/gh/Command/Issue/Comment.pm »