line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Sandy::CLI; |
2
|
|
|
|
|
|
|
# ABSTRACT: Base class for command line interface. |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
531
|
use App::Sandy::Base 'class'; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
9
|
|
5
|
1
|
|
|
1
|
|
17
|
use Path::Class 'file'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
282
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.24'; # VERSION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has 'argv' => ( |
10
|
|
|
|
|
|
|
is => 'ro', |
11
|
|
|
|
|
|
|
isa => 'ArrayRef', |
12
|
|
|
|
|
|
|
default => sub { \@ARGV } |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has 'progname' => ( |
16
|
|
|
|
|
|
|
is => 'ro', |
17
|
|
|
|
|
|
|
isa => 'Str', |
18
|
|
|
|
|
|
|
default => file($0)->basename |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub opt_spec { |
22
|
0
|
|
|
0
|
1
|
|
'help|h', |
23
|
|
|
|
|
|
|
'man|H' |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=pod |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=encoding UTF-8 |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
App::Sandy::CLI - Base class for command line interface. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 VERSION |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
version 0.24 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 SYNOPSIS |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
extends 'App::Sandy::CLI'; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 DESCRIPTION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
This is the base class for CLI interface |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 METHODS |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 argv |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This mthod returns the \@ARGV |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head2 progname |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This method returns the program name |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 opt_spec |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
This is the global options method. Child classes may |
61
|
|
|
|
|
|
|
override it and provides more options by $self->super |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 SEE ALSO |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=over 4 |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=item * |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
L<App::Sandy::CLI::App> |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item * |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
L<App::Sandy::CLI::Command> |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=back |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 AUTHORS |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=over 4 |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=item * |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Thiago L. A. Miller <tmiller@mochsl.org.br> |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=item * |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
J. Leonel Buzzo <lbuzzo@mochsl.org.br> |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=item * |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Felipe R. C. dos Santos <fsantos@mochsl.org.br> |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=item * |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Helena B. Conceição <hconceicao@mochsl.org.br> |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=item * |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Rodrigo Barreiro <rbarreiro@mochsl.org.br> |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=item * |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Gabriela Guardia <gguardia@mochsl.org.br> |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=item * |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Fernanda Orpinelli <forpinelli@mochsl.org.br> |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=item * |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Rafael Mercuri <rmercuri@mochsl.org.br> |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=item * |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Rodrigo Barreiro <rbarreiro@mochsl.org.br> |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=item * |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Pedro A. F. Galante <pgalante@mochsl.org.br> |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=back |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
This software is Copyright (c) 2023 by Teaching and Research Institute from Sírio-Libanês Hospital. |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
This is free software, licensed under: |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
The GNU General Public License, Version 3, June 2007 |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=cut |