line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Group::Git::Cmd::Todo; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Created on: 2013-05-10 07:05:17 |
4
|
|
|
|
|
|
|
# Create by: Ivan Wills |
5
|
|
|
|
|
|
|
# $Id$ |
6
|
|
|
|
|
|
|
# $Revision$, $HeadURL$, $Date$ |
7
|
|
|
|
|
|
|
# $Revision$, $Source$, $Date$ |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
19800
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
10
|
1
|
|
|
1
|
|
533
|
use version; |
|
1
|
|
|
|
|
1450
|
|
|
1
|
|
|
|
|
5
|
|
11
|
1
|
|
|
1
|
|
568
|
use Moose::Role; |
|
1
|
|
|
|
|
401794
|
|
|
1
|
|
|
|
|
4
|
|
12
|
1
|
|
|
1
|
|
4452
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
107
|
|
13
|
1
|
|
|
1
|
|
773
|
use Data::Dumper qw/Dumper/; |
|
1
|
|
|
|
|
5388
|
|
|
1
|
|
|
|
|
76
|
|
14
|
1
|
|
|
1
|
|
619
|
use English qw/ -no_match_vars /; |
|
1
|
|
|
|
|
2995
|
|
|
1
|
|
|
|
|
7
|
|
15
|
1
|
|
|
1
|
|
881
|
use File::chdir; |
|
1
|
|
|
|
|
2527
|
|
|
1
|
|
|
|
|
84
|
|
16
|
1
|
|
|
1
|
|
706
|
use Path::Tiny; |
|
1
|
|
|
|
|
6770
|
|
|
1
|
|
|
|
|
56
|
|
17
|
1
|
|
|
1
|
|
594
|
use Getopt::Alt; |
|
1
|
|
|
|
|
145303
|
|
|
1
|
|
|
|
|
8
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
our $VERSION = version->new('0.0.1'); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
my $opt = Getopt::Alt->new( |
22
|
|
|
|
|
|
|
{ |
23
|
|
|
|
|
|
|
helper => 1, |
24
|
|
|
|
|
|
|
help => __PACKAGE__, |
25
|
|
|
|
|
|
|
default => { |
26
|
|
|
|
|
|
|
min => 1, |
27
|
|
|
|
|
|
|
}, |
28
|
|
|
|
|
|
|
}, |
29
|
|
|
|
|
|
|
[ |
30
|
|
|
|
|
|
|
'min|min-commits|m=i', |
31
|
|
|
|
|
|
|
'name|n', |
32
|
|
|
|
|
|
|
'no_release|no-release', |
33
|
|
|
|
|
|
|
'verbose|v+', |
34
|
|
|
|
|
|
|
'quiet|q!', |
35
|
|
|
|
|
|
|
] |
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $todo = ''; |
39
|
|
|
|
|
|
|
sub todo { |
40
|
0
|
|
|
0
|
1
|
|
my ($self, $name) = @_; |
41
|
|
|
|
|
|
|
|
42
|
0
|
0
|
|
|
|
|
return unless -d $name; |
43
|
|
|
|
|
|
|
|
44
|
0
|
0
|
|
|
|
|
$opt->process if !%{ $opt->opt || {} }; |
|
0
|
0
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
local $CWD = $name; |
47
|
|
|
|
|
|
|
|
48
|
0
|
0
|
|
|
|
|
return if !-f 'TODO.md'; |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
$todo .= "\n# $name\n\n" . path('TODO.md')->slurp; |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
return; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub todo_end { |
56
|
0
|
|
|
0
|
1
|
|
print $todo; |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
return; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 NAME |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Group::Git::Cmd::Todo - Group-Git tools to show combined markdown TODOs |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 VERSION |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
This documentation refers to Group::Git::Cmd::Todo version 0.0.1 |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 SYNOPSIS |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
use Group::Git::Cmd::Todo; |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
# Brief but working code example(s) here showing the most common usage(s) |
78
|
|
|
|
|
|
|
# This section will be as far as many users bother reading, so make it as |
79
|
|
|
|
|
|
|
# educational and exemplary as possible. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 DESCRIPTION |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Adds the sub-command C<todo> to C<group-git>, it concatenates all the |
85
|
|
|
|
|
|
|
C<TODO.md> files so you can view a summary of things to do. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head2 C<todo ($name)> |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Reads the TODO.md file from the repository C<$name>. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head2 C<todo_end ()> |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Returns the concatenated TODO.md contents for presentation. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 DIAGNOSTICS |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 CONFIGURATION AND ENVIRONMENT |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 INCOMPATIBILITIES |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 BUGS AND LIMITATIONS |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
There are no known bugs in this module. |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Please report problems to Ivan Wills (ivan.wills@gmail.com). |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Patches are welcome. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head1 AUTHOR |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Ivan Wills - (ivan.wills@gmail.com) |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Copyright (c) 2013 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). |
120
|
|
|
|
|
|
|
All rights reserved. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or modify it under |
123
|
|
|
|
|
|
|
the same terms as Perl itself. See L<perlartistic>. This program is |
124
|
|
|
|
|
|
|
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
125
|
|
|
|
|
|
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
126
|
|
|
|
|
|
|
PARTICULAR PURPOSE. |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=cut |