/[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

Annotation of /Webpacus/script/webpacus_create.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 223 - (hide annotations)
Mon Dec 5 19:15:06 2005 UTC (18 years, 5 months ago) by dpavlin
File MIME type: text/plain
File size: 1571 byte(s)
 r11544@llin:  dpavlin | 2005-12-05 16:49:09 +0100
 re-created scripts using catalyst.pl -nonew -scripts Webpacus

1 dpavlin 83 #!/usr/bin/perl -w
2    
3     use strict;
4     use Getopt::Long;
5     use Pod::Usage;
6     use Catalyst::Helper;
7    
8 dpavlin 223 my $force = 0;
9     my $help = 0;
10 dpavlin 83
11     GetOptions(
12 dpavlin 223 'nonew|force' => \$force,
13     'help|?' => \$help
14 dpavlin 83 );
15    
16     pod2usage(1) if ( $help || !$ARGV[0] );
17    
18 dpavlin 223 my $helper = Catalyst::Helper->new( { '.newfiles' => !$force } );
19 dpavlin 83
20     pod2usage(1) unless $helper->mk_component( 'Webpacus', @ARGV );
21    
22     1;
23    
24     =head1 NAME
25    
26     webpacus_create.pl - Create a new Catalyst Component
27    
28     =head1 SYNOPSIS
29    
30     webpacus_create.pl [options] model|view|controller name [helper] [options]
31    
32     Options:
33 dpavlin 223 -force don't create a .new file where a file to be created exists
34 dpavlin 83 -help display this help and exits
35    
36     Examples:
37     webpacus_create.pl controller My::Controller
38     webpacus_create.pl view My::View
39     webpacus_create.pl view MyView TT
40     webpacus_create.pl view TT TT
41     webpacus_create.pl model My::Model
42     webpacus_create.pl model SomeDB CDBI dbi:SQLite:/tmp/my.db
43     webpacus_create.pl model AnotherDB CDBI dbi:Pg:dbname=foo root 4321
44    
45     See also:
46     perldoc Catalyst::Manual
47     perldoc Catalyst::Manual::Intro
48    
49     =head1 DESCRIPTION
50    
51     Create a new Catalyst Component.
52    
53     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.
55 dpavlin 223 This behavior can be suppressed with the C<-force> option.
56 dpavlin 83
57     =head1 AUTHOR
58    
59 dpavlin 223 Sebastian Riedel, C<sri@oook.de>
60 dpavlin 83
61     =head1 COPYRIGHT
62    
63     Copyright 2004 Sebastian Riedel. All rights reserved.
64    
65     This library is free software, you can redistribute it and/or modify
66     it under the same terms as Perl itself.
67    
68     =cut

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26