helpers now create .new files where files to be created already exist; -nonew option...
[catagits/Catalyst-Runtime.git] / script / catalyst.pl
1 #!/usr/bin/perl -w
2
3 use strict;
4 use Getopt::Long;
5 use Pod::Usage;
6 use Catalyst::Helper;
7
8 my $help  = 0;
9 my $nonew = 0;
10
11 GetOptions( 'help|?' => \$help,
12             'nonew'  => \$nonew );
13
14 pod2usage(1) if ( $help || !$ARGV[0] );
15
16 my $helper = Catalyst::Helper->new({'.newfiles' => !$nonew});
17 pod2usage(1) unless $helper->mk_app( $ARGV[0] );
18
19 1;
20 __END__
21
22 =head1 NAME
23
24 catalyst - Bootstrap a Catalyst application
25
26 =head1 SYNOPSIS
27
28 catalyst.pl [options] application-name
29
30  Options:
31    -help        display this help and exits
32    -nonew       don't create a .new file where a file to be created exists
33
34  application-name has to be a valid Perl module name and can include ::
35
36  Examples:
37     catalyst.pl My::App
38     catalyst.pl MyApp
39
40  See also:
41     perldoc Catalyst::Manual
42     perldoc Catalyst::Manual::Intro
43
44 =head1 DESCRIPTION
45
46 Bootstrap a Catalyst application.
47
48 =head1 SEE ALSO
49
50 L<Catalyst>, L<Catalyst::Manual>, L<Catalyst::Manual::Intro>,
51 L<Catalyst::Test>, L<Catalyst::Request>, L<Catalyst::Response>,
52 L<Catalyst::Engine>
53
54 =head1 AUTHOR
55
56 Sebastian Riedel, C<sri@oook.de>
57
58 =head1 COPYRIGHT
59
60 Copyright 2004 Sebastian Riedel. All rights reserved.
61
62 This library is free software. You can redistribute it and/or modify it under
63 the same terms as perl itself.
64
65 =cut