/[webpac2]/Webpacus/script/webpacus_create.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /Webpacus/script/webpacus_create.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 83 by dpavlin, Mon Nov 21 17:46:27 2005 UTC revision 223 by dpavlin, Mon Dec 5 19:15:06 2005 UTC
# Line 5  use Getopt::Long; Line 5  use Getopt::Long;
5  use Pod::Usage;  use Pod::Usage;
6  use Catalyst::Helper;  use Catalyst::Helper;
7    
8  my $help = 0;  my $force = 0;
9  my $nonew = 0;  my $help  = 0;
 my $short = 0;  
10    
11  GetOptions(  GetOptions(
12      'help|?' => \$help,      'nonew|force' => \$force,
13      'nonew'  => \$nonew,      'help|?'      => \$help
     'short'  => \$short  
14   );   );
15    
16  pod2usage(1) if ( $help || !$ARGV[0] );  pod2usage(1) if ( $help || !$ARGV[0] );
17    
18  my $helper =  my $helper = Catalyst::Helper->new( { '.newfiles' => !$force } );
     Catalyst::Helper->new( { '.newfiles' => !$nonew, short => $short } );  
19    
20  pod2usage(1) unless $helper->mk_component( 'Webpacus', @ARGV );  pod2usage(1) unless $helper->mk_component( 'Webpacus', @ARGV );
21    
# Line 33  webpacus_create.pl - Create a new Cataly Line 30  webpacus_create.pl - Create a new Cataly
30  webpacus_create.pl [options] model|view|controller name [helper] [options]  webpacus_create.pl [options] model|view|controller name [helper] [options]
31    
32   Options:   Options:
33       -force    don't create a .new file where a file to be created exists
34     -help     display this help and exits     -help     display this help and exits
    -nonew    don't create a .new file where a file to be created exists  
    -short    use short types, like C instead of Controller...  
35    
36   Examples:   Examples:
37     webpacus_create.pl controller My::Controller     webpacus_create.pl controller My::Controller
# Line 56  Create a new Catalyst Component. Line 52  Create a new Catalyst Component.
52    
53  Existing component files are not overwritten.  If any of the component files  Existing component files are not overwritten.  If any of the component files
54  to be created already exist the file will be written with a '.new' suffix.  to be created already exist the file will be written with a '.new' suffix.
55  This behavior can be suppressed with the C<-nonew> option.  This behavior can be suppressed with the C<-force> option.
56    
57  =head1 AUTHOR  =head1 AUTHOR
58    
59  Sebastian Riedel, C<sri\@oook.de>  Sebastian Riedel, C<sri@oook.de>
60    
61  =head1 COPYRIGHT  =head1 COPYRIGHT
62    

Legend:
Removed from v.83  
changed lines
  Added in v.223

  ViewVC Help
Powered by ViewVC 1.1.26