line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Group::Git::Cmd::List; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Created on: 2013-05-06 21:57:07 |
4
|
|
|
|
|
|
|
# Create by: Ivan Wills |
5
|
|
|
|
|
|
|
# $Id$ |
6
|
|
|
|
|
|
|
# $Revision$, $HeadURL$, $Date$ |
7
|
|
|
|
|
|
|
# $Revision$, $Source$, $Date$ |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
960
|
use Moo::Role; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
13
|
|
10
|
1
|
|
|
1
|
|
2841
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
25
|
|
11
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
34
|
|
12
|
1
|
|
|
1
|
|
7
|
use version; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
10
|
|
13
|
1
|
|
|
1
|
|
74
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
84
|
|
14
|
1
|
|
|
1
|
|
6
|
use English qw/ -no_match_vars /; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
11
|
|
15
|
1
|
|
|
1
|
|
548
|
use File::chdir; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
92
|
|
16
|
1
|
|
|
1
|
|
8
|
use Getopt::Alt; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
11
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our $VERSION = version->new('0.7.6'); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
requires 'repos'; |
21
|
|
|
|
|
|
|
requires 'verbose'; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has repo_count => ( |
24
|
|
|
|
|
|
|
is => 'rw', |
25
|
|
|
|
|
|
|
default => 0, |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
my $opt = Getopt::Alt->new( |
29
|
|
|
|
|
|
|
{ help => __PACKAGE__, }, |
30
|
|
|
|
|
|
|
[ |
31
|
|
|
|
|
|
|
'quiet|q', |
32
|
|
|
|
|
|
|
'verbose|v', |
33
|
|
|
|
|
|
|
] |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub list_start { |
37
|
0
|
|
|
0
|
1
|
|
$opt->process; |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
return; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub list { |
43
|
0
|
|
|
0
|
1
|
|
my ($self, $name) = @_; |
44
|
0
|
0
|
|
|
|
|
return unless -d $name; |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
$self->repo_count($self->repo_count + 1); |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
return ' '; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub list_end { |
52
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
53
|
|
|
|
|
|
|
|
54
|
0
|
0
|
|
|
|
|
if ($opt->opt->verbose) { |
55
|
0
|
|
|
|
|
|
return "\nSummary:\nFound " . $self->repo_count . " repositories\n"; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
return; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 NAME |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Group::Git::Cmd::List - Runs git status on a git project |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 VERSION |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
This documentation refers to Group::Git::Cmd::List version 0.7.6. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 SYNOPSIS |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
use Group::Git::Cmd::List; |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
# Brief but working code example(s) here showing the most common usage(s) |
79
|
|
|
|
|
|
|
# This section will be as far as many users bother reading, so make it as |
80
|
|
|
|
|
|
|
# educational and exemplary as possible. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 DESCRIPTION |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=over 4 |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=item C<list ($name)> |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Just prints C<$name> to STDERR if such a directory exists. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=item C<list_start ()> |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Processes command line options |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=item C<list_end ()> |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
If summary is asked for this returns the count of repositories found |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=item C<repo_count ([$count])> |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Gets/sets the count of repositories found. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=back |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 DIAGNOSTICS |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 CONFIGURATION AND ENVIRONMENT |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head1 INCOMPATIBILITIES |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head1 BUGS AND LIMITATIONS |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
There are no known bugs in this module. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Please report problems to Ivan Wills (ivan.wills@gmail.com). |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Patches are welcome. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head1 AUTHOR |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
Ivan Wills - (ivan.wills@gmail.com) |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Copyright (c) 2013 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). |
130
|
|
|
|
|
|
|
All rights reserved. |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or modify it under |
133
|
|
|
|
|
|
|
the same terms as Perl itself. See L<perlartistic>. This program is |
134
|
|
|
|
|
|
|
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
135
|
|
|
|
|
|
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
136
|
|
|
|
|
|
|
PARTICULAR PURPOSE. |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=cut |