File Coverage

blib/lib/Mojolicious/Command/Author/generate.pm
Criterion Covered Total %
statement 4 4 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod 1 1 100.0
total 7 7 100.0


line stmt bran cond sub pod time code
1             package Mojolicious::Command::Author::generate;
2 1     1   9 use Mojo::Base 'Mojolicious::Commands';
  1         2  
  1         8  
3              
4             has description => 'Generate files and directories from templates';
5             has hint => <
6              
7             See 'APPLICATION generate help GENERATOR' for more information on a specific
8             generator.
9             EOF
10             has message => sub { shift->extract_usage . "\nGenerators:\n" };
11             has namespaces => sub { ['Mojolicious::Command::Author::generate'] };
12              
13 1     1 1 16 sub help { shift->run(@_) }
14              
15             1;
16              
17             =encoding utf8
18              
19             =head1 NAME
20              
21             Mojolicious::Command::Author::generate - Generator command
22              
23             =head1 SYNOPSIS
24              
25             Usage: APPLICATION generate GENERATOR [OPTIONS]
26              
27             mojo generate app
28             mojo generate lite-app
29              
30             =head1 DESCRIPTION
31              
32             L lists available generators.
33              
34             This is a core command, that means it is always enabled and its code a good example for learning to build new commands,
35             you're welcome to fork it.
36              
37             See L for a list of commands that are available by default.
38              
39             =head1 ATTRIBUTES
40              
41             L inherits all attributes from L and implements the
42             following new ones.
43              
44             =head2 description
45              
46             my $description = $generator->description;
47             $generator = $generator->description('Foo');
48              
49             Short description of this command, used for the command list.
50              
51             =head2 hint
52              
53             my $hint = $generator->hint;
54             $generator = $generator->hint('Foo');
55              
56             Short hint shown after listing available generator commands.
57              
58             =head2 message
59              
60             my $msg = $generator->message;
61             $generator = $generator->message('Bar');
62              
63             Short usage message shown before listing available generator commands.
64              
65             =head2 namespaces
66              
67             my $namespaces = $generator->namespaces;
68             $generator = $generator->namespaces(['MyApp::Command::generate']);
69              
70             Namespaces to search for available generator commands, defaults to L.
71              
72             =head1 METHODS
73              
74             L inherits all methods from L and implements the
75             following new ones.
76              
77             =head2 help
78              
79             $generator->help('app');
80              
81             Print usage information for generator command.
82              
83             =head1 SEE ALSO
84              
85             L, L, L.
86              
87             =cut