1 | package Mojolicious::Command::generate::makefile;
|
---|
2 | use Mojo::Base 'Mojolicious::Command';
|
---|
3 |
|
---|
4 | use Mojolicious;
|
---|
5 |
|
---|
6 | has description => 'Generate "Makefile.PL"';
|
---|
7 | has usage => sub { shift->extract_usage };
|
---|
8 |
|
---|
9 | sub run { shift->render_to_rel_file('makefile', 'Makefile.PL') }
|
---|
10 |
|
---|
11 | 1;
|
---|
12 |
|
---|
13 | =encoding utf8
|
---|
14 |
|
---|
15 | =head1 NAME
|
---|
16 |
|
---|
17 | Mojolicious::Command::generate::makefile - Makefile generator command
|
---|
18 |
|
---|
19 | =head1 SYNOPSIS
|
---|
20 |
|
---|
21 | Usage: APPLICATION generate makefile [OPTIONS]
|
---|
22 |
|
---|
23 | mojo generate makefile
|
---|
24 |
|
---|
25 | Options:
|
---|
26 | -h, --help Show this summary of available options
|
---|
27 |
|
---|
28 | =head1 DESCRIPTION
|
---|
29 |
|
---|
30 | L<Mojolicious::Command::generate::makefile> generates C<Makefile.PL> files for
|
---|
31 | applications.
|
---|
32 |
|
---|
33 | This is a core command, that means it is always enabled and its code a good
|
---|
34 | example for learning to build new commands, you're welcome to fork it.
|
---|
35 |
|
---|
36 | See L<Mojolicious::Commands/"COMMANDS"> for a list of commands that are
|
---|
37 | available by default.
|
---|
38 |
|
---|
39 | =head1 ATTRIBUTES
|
---|
40 |
|
---|
41 | L<Mojolicious::Command::generate::makefile> inherits all attributes from
|
---|
42 | L<Mojolicious::Command> and implements the following new ones.
|
---|
43 |
|
---|
44 | =head2 description
|
---|
45 |
|
---|
46 | my $description = $makefile->description;
|
---|
47 | $makefile = $makefile->description('Foo');
|
---|
48 |
|
---|
49 | Short description of this command, used for the command list.
|
---|
50 |
|
---|
51 | =head2 usage
|
---|
52 |
|
---|
53 | my $usage = $makefile->usage;
|
---|
54 | $makefile = $makefile->usage('Foo');
|
---|
55 |
|
---|
56 | Usage information for this command, used for the help screen.
|
---|
57 |
|
---|
58 | =head1 METHODS
|
---|
59 |
|
---|
60 | L<Mojolicious::Command::generate::makefile> inherits all methods from
|
---|
61 | L<Mojolicious::Command> and implements the following new ones.
|
---|
62 |
|
---|
63 | =head2 run
|
---|
64 |
|
---|
65 | $makefile->run(@ARGV);
|
---|
66 |
|
---|
67 | Run this command.
|
---|
68 |
|
---|
69 | =head1 SEE ALSO
|
---|
70 |
|
---|
71 | L<Mojolicious>, L<Mojolicious::Guides>, L<https://mojolicious.org>.
|
---|
72 |
|
---|
73 | =cut
|
---|
74 |
|
---|
75 | __DATA__
|
---|
76 |
|
---|
77 | @@ makefile
|
---|
78 | use strict;
|
---|
79 | use warnings;
|
---|
80 |
|
---|
81 | use ExtUtils::MakeMaker;
|
---|
82 |
|
---|
83 | WriteMakefile(
|
---|
84 | VERSION => '0.01',
|
---|
85 | PREREQ_PM => {'Mojolicious' => '<%= $Mojolicious::VERSION %>'},
|
---|
86 | test => {TESTS => 't/*.t'}
|
---|
87 | );
|
---|