Newer Older
83 lines | 1.804kb
add files
Yuki Kimoto authored on 2014-03-26
1
package Mojolicious::Command::generate::makefile;
2
use Mojo::Base 'Mojolicious::Command';
3

            
4
use Mojolicious;
5

            
6
has description => qq{Generate "Makefile.PL".\n};
7
has usage       => "usage: $0 generate makefile\n";
8

            
9
sub run { shift->render_to_rel_file('makefile', 'Makefile.PL') }
10

            
11
1;
12
__DATA__
13

            
14
@@ makefile
15
use strict;
16
use warnings;
17

            
18
use ExtUtils::MakeMaker;
19

            
20
WriteMakefile(
21
  VERSION   => '0.01',
22
  PREREQ_PM => {'Mojolicious' => '<%= $Mojolicious::VERSION %>'},
23
  test      => {TESTS => 't/*.t'}
24
);
25

            
26
__END__
27

            
28
=encoding utf8
29

            
30
=head1 NAME
31

            
32
Mojolicious::Command::generate::makefile - Makefile generator command
33

            
34
=head1 SYNOPSIS
35

            
36
  use Mojolicious::Command::generate::makefile;
37

            
38
  my $makefile = Mojolicious::Command::generate::makefile->new;
39
  $makefile->run(@ARGV);
40

            
41
=head1 DESCRIPTION
42

            
43
L<Mojolicious::Command::generate::makefile> generates C<Makefile.PL> files for
44
applications.
45

            
46
This is a core command, that means it is always enabled and its code a good
47
example for learning to build new commands, you're welcome to fork it.
48

            
49
=head1 ATTRIBUTES
50

            
51
L<Mojolicious::Command::generate::makefile> inherits all attributes from
52
L<Mojolicious::Command> and implements the following new ones.
53

            
54
=head2 description
55

            
56
  my $description = $makefile->description;
57
  $makefile       = $makefile->description('Foo!');
58

            
59
Short description of this command, used for the command list.
60

            
61
=head2 usage
62

            
63
  my $usage = $makefile->usage;
64
  $makefile = $makefile->usage('Foo!');
65

            
66
Usage information for this command, used for the help screen.
67

            
68
=head1 METHODS
69

            
70
L<Mojolicious::Command::generate::makefile> inherits all methods from
71
L<Mojolicious::Command> and implements the following new ones.
72

            
73
=head2 run
74

            
75
  $makefile->run(@ARGV);
76

            
77
Run this command.
78

            
79
=head1 SEE ALSO
80

            
81
L<Mojolicious>, L<Mojolicious::Guides>, L<http://mojolicio.us>.
82

            
83
=cut