line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Group::Git::Repo; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Created on: 2013-05-05 19:07:36 |
4
|
|
|
|
|
|
|
# Create by: Ivan Wills |
5
|
|
|
|
|
|
|
# $Id$ |
6
|
|
|
|
|
|
|
# $Revision$, $HeadURL$, $Date$ |
7
|
|
|
|
|
|
|
# $Revision$, $Source$, $Date$ |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
10
|
use Moo; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
10
|
1
|
|
|
1
|
|
499
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
11
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
12
|
1
|
|
|
1
|
|
5
|
use version; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
13
|
1
|
|
|
1
|
|
788
|
use Types::Standard qw/Str HashRef/; |
|
1
|
|
|
|
|
82930
|
|
|
1
|
|
|
|
|
16
|
|
14
|
1
|
|
|
1
|
|
1893
|
use Type::Utils; |
|
1
|
|
|
|
|
5419
|
|
|
1
|
|
|
|
|
16
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = version->new('0.7.6'); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
extends 'Group::Git'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has name => ( |
21
|
|
|
|
|
|
|
is => 'rw', |
22
|
|
|
|
|
|
|
isa => class_type { class => 'Path::Tiny' }, |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
has url => ( |
25
|
|
|
|
|
|
|
is => 'rw', |
26
|
|
|
|
|
|
|
isa => Str, |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
has git => ( |
29
|
|
|
|
|
|
|
is => 'rw', |
30
|
|
|
|
|
|
|
isa => Str, |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
has tags => ( |
33
|
|
|
|
|
|
|
is => 'rw', |
34
|
|
|
|
|
|
|
isa => HashRef, |
35
|
|
|
|
|
|
|
default => sub {{}}, |
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
has mech => ( |
39
|
|
|
|
|
|
|
is => 'rw', |
40
|
|
|
|
|
|
|
lazy => 1, |
41
|
|
|
|
|
|
|
builder => '_mech', |
42
|
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub _mech { |
45
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
46
|
0
|
|
|
|
|
|
my $mech; |
47
|
|
|
|
|
|
|
|
48
|
0
|
0
|
0
|
|
|
|
if ($self->conf->{cache_dir} && eval { require WWW::Mechanize::Cached }) { |
|
0
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
$mech = WWW::Mechanize::Cached->new( |
50
|
|
|
|
|
|
|
cache => CHI->new( |
51
|
|
|
|
|
|
|
driver => 'File', |
52
|
|
|
|
|
|
|
root_dir => $self->conf->{cache_dir}, |
53
|
0
|
|
|
|
|
|
), |
54
|
|
|
|
|
|
|
); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
else { |
57
|
0
|
|
|
|
|
|
$mech = WWW::Mechanize->new; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
return $mech; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
__END__ |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 NAME |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Group::Git::Repo - Git repository details object. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 VERSION |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
This documentation refers to Group::Git::Repo version 0.7.6. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 SYNOPSIS |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
use Group::Git::Repo; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
# create a new repository object |
81
|
|
|
|
|
|
|
my $ggr = Group::Git::Repo->new( |
82
|
|
|
|
|
|
|
name => 'some-repo', |
83
|
|
|
|
|
|
|
url => 'http://example.com/some-repo/', |
84
|
|
|
|
|
|
|
git => 'git@example.com/some-repo.git', |
85
|
|
|
|
|
|
|
); |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 DESCRIPTION |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
C<Group::Git::Repo> stores the basic information about a git repository for |
90
|
|
|
|
|
|
|
other L<Group::Git> modules to use. It does nothing by it's self. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 DIAGNOSTICS |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 CONFIGURATION AND ENVIRONMENT |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 INCOMPATIBILITIES |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 BUGS AND LIMITATIONS |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
There are no known bugs in this module. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Please report problems to Ivan Wills (ivan.wills@gmail.com). |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Patches are welcome. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 AUTHOR |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Ivan Wills - (ivan.wills@gmail.com) |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Copyright (c) 2013 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). |
117
|
|
|
|
|
|
|
All rights reserved. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or modify it under |
120
|
|
|
|
|
|
|
the same terms as Perl itself. See L<perlartistic>. This program is |
121
|
|
|
|
|
|
|
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
122
|
|
|
|
|
|
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
123
|
|
|
|
|
|
|
PARTICULAR PURPOSE. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=cut |