lib/Git/Wrapper/Plus.pm

filter: Statementstmt 94.9% 56 / 59 Branchbran 66.6% 8 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 12 / 12 Podpod 100% 1 / 1 totaltotal 91.6% 77 / 84 SCAR 19.5
CC
7
Cov
90%
BUILDARGS
7.6
BEGIN
1.0
BEGIN
1.0
CRAP 7.0
« lib/Git/Wrapper/Plus/Support.pm ↑ Summary lib/Git/Wrapper/Plus/Tags.pm »
1 4 ▶use 5.008; # utf8
Subroutine BEGIN: called CC=1 SCAR=0.0
2 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 package Git::Wrapper::Plus;
7 4 $Git::Wrapper::Plus::VERSION = '0.004010';
8 # ABSTRACT: A Toolkit for working with Git::Wrapper in an Object Oriented Way.
9  
10 4 our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105 4 ▶use Moo qw( has );
Subroutine BEGIN: called CC=1 SCAR=0.0
106 4 ▶use Scalar::Util qw( blessed );
Subroutine BEGIN: called CC=1 SCAR=0.0
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119 sub BUILDARGS {
120 4 ▶ my ( undef, @args ) = @_;
Subroutine BUILDARGS: called CC=7 SCAR=20.3
Pod documented
121 4 ▶ if ( 1 == @args ) {
Branch: 1 branch
BranchTrueFalseTotal
if (1 == @args) 4 0 4
122 blesscheck: {
123 4 ▶ if ( blessed $args[0] ) {
Branch: 1 branch
BranchTrueFalseTotal
if (builtin::blessed($args[0])) 4 0 4
124 4 ▶ if ( $args[0]->isa('Path::Tiny') ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($args[0]->isa("Path::Tiny")) 2 2 4
125 2 $args[0] = q[] . $args[0];
126 2 last blesscheck;
127 }
128 2 ▶ if ( $args[0]->isa('Path::Class::Dir') ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($args[0]->isa("Path::Class::Dir")) 1 1 2
129 1 $args[0] = q[] . $args[0];
130 1 last blesscheck;
131 }
132 1 ▶ if ( $args[0]->isa('Path::Class::File') ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($args[0]->isa("Path::Class::File")) 0 1 1
133 0 $args[0] = q[] . $args[0];
134 0 last blesscheck;
135 }
136 1 return { git => $args[0] };
137 }
138 }
139 3 ▶ return $args[0] if ref $args[0];
Branch: 1 branch
BranchTrueFalseTotal
if ref $args[0] 0 3 3
140  
141 3 require Git::Wrapper;
142 3 return { git => Git::Wrapper->new( $args[0] ) };
143 }
144 0 return {@args};
145 }
146  
147  
148  
149  
150  
151  
152  
153 4 has git => ( is => ro =>, required => 1 );
154  
155 4 has refs => ( is => ro =>, lazy => 1, builder => 1 );
156  
157 sub _build_refs {
158 1 ▶ my ( $self, ) = @_;
Subroutine _build_refs: called CC=1 SCAR=0.0
159 1 require Git::Wrapper::Plus::Refs;
160 1 return Git::Wrapper::Plus::Refs->new( git => $self->git );
161 }
162  
163  
164  
165  
166  
167 4 has tags => ( is => ro =>, lazy => 1, builder => 1 );
168  
169 sub _build_tags {
170 1 ▶ my ( $self, ) = @_;
Subroutine _build_tags: called CC=1 SCAR=0.0
171 1 require Git::Wrapper::Plus::Tags;
172 1 return Git::Wrapper::Plus::Tags->new( git => $self->git );
173 }
174  
175  
176  
177  
178  
179 4 has branches => ( is => ro =>, lazy => 1, builder => 1 );
180  
181 sub _build_branches {
182 1 ▶ my ( $self, ) = @_;
Subroutine _build_branches: called CC=1 SCAR=0.0
183 1 require Git::Wrapper::Plus::Branches;
184 1 return Git::Wrapper::Plus::Branches->new( git => $self->git );
185 }
186  
187  
188  
189  
190  
191 4 has versions => ( is => ro =>, lazy => 1, builder => 1 );
192  
193 sub _build_versions {
194 1 ▶ my ( $self, ) = @_;
Subroutine _build_versions: called CC=1 SCAR=0.0
195 1 require Git::Wrapper::Plus::Versions;
196 1 return Git::Wrapper::Plus::Versions->new( git => $self->git );
197 }
198  
199  
200  
201  
202  
203 4 has support => ( is => ro =>, lazy => 1, builder => 1 );
204  
205 sub _build_support {
206 1 ▶ my ( $self, ) = @_;
Subroutine _build_support: called CC=1 SCAR=0.0
207 1 require Git::Wrapper::Plus::Support;
208 1 return Git::Wrapper::Plus::Support->new( git => $self->git );
209 }
210  
211 4 1;
212  
213 __END__
« lib/Git/Wrapper/Plus/Support.pm ↑ Summary lib/Git/Wrapper/Plus/Tags.pm »