| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Ado::Command::generate; |
|
2
|
6
|
|
|
6
|
|
8853
|
use Ado; |
|
|
6
|
|
|
|
|
13
|
|
|
|
6
|
|
|
|
|
53
|
|
|
3
|
6
|
|
|
6
|
|
173
|
use Mojo::Base 'Mojolicious::Command::generate'; |
|
|
6
|
|
|
|
|
9
|
|
|
|
6
|
|
|
|
|
17
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
has namespaces => sub { ['Ado::Command::generate', 'Mojolicious::Command::generate'] }; |
|
6
|
|
|
|
|
|
|
has app => sub { Mojo::Server->new->build_app('Ado') }; |
|
7
|
|
|
|
|
|
|
has args => sub { {} }; |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
1; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=encoding utf8 |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 NAME |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Ado::Command::generate - Generator command |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Usage: APPLICATION generate GENERATOR [OPTIONS] |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
L lists available generators. |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
This is a core command, that means it is always enabled and its code a good |
|
26
|
|
|
|
|
|
|
example for learning to build new commands, you're welcome to fork it. |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
See L for a list of commands that are |
|
29
|
|
|
|
|
|
|
available by default. |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
L inherits all attributes from |
|
34
|
|
|
|
|
|
|
L and implements the following new ones. |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head2 app |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
$crud->app(Mojo::Server->new->build_app('Ado')); |
|
39
|
|
|
|
|
|
|
my $app = $crud->app; # ISA Ado |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
An instance of Ado. Used in L, |
|
42
|
|
|
|
|
|
|
L and possibly others. |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 args |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Used for storing arguments from the commandline and then passing them to the |
|
49
|
|
|
|
|
|
|
template |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my $args = $self->args; |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head2 namespaces |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
my $namespaces = $generator->namespaces; |
|
57
|
|
|
|
|
|
|
$generator = $generator->namespaces(['MyApp::Command::generate']); |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Namespaces to search for available generator commands, defaults to |
|
60
|
|
|
|
|
|
|
C<['Mojolicious::Command::generate','Ado::Command::generate']>. |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 METHODS |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
L inherits all methods from |
|
65
|
|
|
|
|
|
|
L. |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
L, L, |
|
71
|
|
|
|
|
|
|
L, L, |
|
72
|
|
|
|
|
|
|
L, L, L. |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=cut |