script/catalyst.pl untested

filter: Statementstmt 0.0% 0 / 26 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 43 CC 2 SCAR 12.0
CC
2
Cov
0%
BEGIN
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.3
1 #!/usr/local/bin/perl -w
2  
3 use strict;
4 use Getopt::Long;
5 use Pod::Usage;
6 BEGIN {
7 eval " use Catalyst::Devel 1.0; ";
8  
9 if ($@) {
10 die <<END;
11 To use the Catalyst development tools including catalyst.pl and the
12 generated script/myapp_create.pl you need Catalyst::Helper, which is
13 part of the Catalyst-Devel distribution. Please install this via a
14 vendor package or by running one of -
15  
16 perl -MCPAN -e 'install Catalyst::Devel'
17 cpanm Catalyst::Devel
18 END
19  
20 }
21 };
22  
23 use Catalyst::Helper;
24  
25 my $force = 0;
26 my $help = 0;
27 my $makefile = 0;
28 my $scripts = 0;
29  
30 GetOptions(
31 'help|?' => \$help,
32 'force|nonew' => \$force,
33 'makefile' => \$makefile,
34 'scripts' => \$scripts,
35 );
36  
37 pod2usage(1) if ( $help || !$ARGV[0] );
38  
39 my $helper = Catalyst::Helper->new(
40 {
41 '.newfiles' => !$force,
42 'makefile' => $makefile,
43 'scripts' => $scripts,
44 name => $ARGV[0],
45 }
46 );
47 # Pass $ARGV[0] for compatibility with old ::Devel
48 pod2usage(1) unless $helper->mk_app( $ARGV[0] );
49  
50 1;
51 __END__