Changeset 255

Show
Ignore:
Timestamp:
06/25/07 07:20:01 (19 months ago)
Author:
eevee
Message:

Updated Catalyst scripts.

Location:
veekun/trunk/script
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • veekun/trunk/script/vee_cgi.pl

    r1 r255  
    1 #!C:\Perl\bin\perl.exe -w 
     1#!/usr/bin/perl -w 
    22 
    33BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' } 
    44 
    55use strict; 
     6use warnings; 
    67use FindBin; 
    78use lib "$FindBin::Bin/../lib"; 
     
    2223=head1 DESCRIPTION 
    2324 
    24 Run a Catalyst application as cgi. 
     25Run a Catalyst application as a cgi script. 
    2526 
    2627=head1 AUTHOR 
     
    3031=head1 COPYRIGHT 
    3132 
    32 Copyright 2004 Sebastian Riedel. All rights reserved. 
    3333 
    3434This library is free software, you can redistribute it and/or modify 
  • veekun/trunk/script/vee_create.pl

    r1 r255  
    1 #!C:\Perl\bin\perl.exe -w 
     1#!/usr/bin/perl -w 
    22 
    33use strict; 
     4use warnings; 
    45use Getopt::Long; 
    56use Pod::Usage; 
     
    4445   vee_create.pl view TT TT 
    4546   vee_create.pl model My::Model 
    46    vee_create.pl model SomeDB DBIC::SchemaLoader dbi:SQLite:/tmp/my.db 
    47    vee_create.pl model AnotherDB DBIC::SchemaLoader dbi:Pg:dbname=foo root 4321 
     47   vee_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\ 
     48   dbi:SQLite:/tmp/my.db 
     49   vee_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\ 
     50   dbi:Pg:dbname=foo root 4321 
    4851 
    4952 See also: 
     
    6265 
    6366Sebastian Riedel, C<sri@oook.de> 
     67Maintained by the Catalyst Core Team. 
    6468 
    6569=head1 COPYRIGHT 
    66  
    67 Copyright 2004 Sebastian Riedel. All rights reserved. 
    6870 
    6971This library is free software, you can redistribute it and/or modify 
  • veekun/trunk/script/vee_fastcgi.pl

    r1 r255  
    1 #!C:\Perl\bin\perl.exe -w 
     1#!/usr/bin/perl -w 
    22 
    33BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' } 
    44 
    55use strict; 
     6use warnings; 
    67use Getopt::Long; 
    78use Pod::Usage; 
     
    1112 
    1213my $help = 0; 
    13 my ( $listen, $nproc, $pidfile, $manager, $detach ); 
     14my ( $listen, $nproc, $pidfile, $manager, $detach, $keep_stderr ); 
    1415  
    1516GetOptions( 
     
    2021    'manager|M=s' => \$manager, 
    2122    'daemon|d'    => \$detach, 
     23    'keeperr|e'   => \$keep_stderr, 
    2224); 
    2325 
     
    3032        manager => $manager, 
    3133        detach  => $detach, 
     34        keep_stderr => $keep_stderr, 
    3235    } 
    3336); 
     
    5861                 (FCGI::ProcManager sub-class) 
    5962                 or empty string to disable 
     63   -e -keeperr   send error messages to STDOUT, not 
     64                 to the webserver 
    6065 
    6166=head1 DESCRIPTION 
     
    6671 
    6772Sebastian Riedel, C<sri@oook.de> 
     73Maintained by the Catalyst Core Team. 
    6874 
    6975=head1 COPYRIGHT 
    70  
    71 Copyright 2004 Sebastian Riedel. All rights reserved. 
    7276 
    7377This library is free software, you can redistribute it and/or modify 
  • veekun/trunk/script/vee_server.pl

    r1 r255  
    1 #!C:\Perl\bin\perl.exe -w 
     1#!/usr/bin/perl -w 
    22 
    33BEGIN {  
    44    $ENV{CATALYST_ENGINE} ||= 'HTTP'; 
    5     $ENV{CATALYST_SCRIPT_GEN} = 27; 
     5    $ENV{CATALYST_SCRIPT_GEN} = 30; 
     6    require Catalyst::Engine::HTTP; 
    67 
    78 
    89use strict; 
     10use warnings; 
    911use Getopt::Long; 
    1012use Pod::Usage; 
     
    1214use lib "$FindBin::Bin/../lib"; 
    1315 
    14 my $debug         = 0; 
    15 my $fork          = 0; 
    16 my $help          = 0; 
    17 my $host          = undef; 
    18 my $port          = 3000; 
    19 my $keepalive     = 0; 
    20 my $restart       = 0; 
    21 my $restart_delay = 1; 
    22 my $restart_regex = '\.yml$|\.yaml$|\.pm$'; 
     16my $debug             = 0; 
     17my $fork              = 0; 
     18my $help              = 0; 
     19my $host              = undef; 
     20my $port              = 3000; 
     21my $keepalive         = 0; 
     22my $restart           = 0; 
     23my $restart_delay     = 1; 
     24my $restart_regex     = '\.yml$|\.yaml$|\.pm$'; 
     25my $restart_directory = undef; 
    2326 
    2427my @argv = @ARGV; 
    2528 
    2629GetOptions( 
    27     'debug|d'           => \$debug, 
    28     'fork'              => \$fork, 
    29     'help|?'            => \$help, 
    30     'host=s'            => \$host, 
    31     'port=s'            => \$port, 
    32     'keepalive|k'       => \$keepalive, 
    33     'restart|r'         => \$restart, 
    34     'restartdelay|rd=s' => \$restart_delay, 
    35     'restartregex|rr=s' => \$restart_regex 
     30    'debug|d'             => \$debug, 
     31    'fork'                => \$fork, 
     32    'help|?'              => \$help, 
     33    'host=s'              => \$host, 
     34    'port=s'              => \$port, 
     35    'keepalive|k'         => \$keepalive, 
     36    'restart|r'           => \$restart, 
     37    'restartdelay|rd=s'   => \$restart_delay, 
     38    'restartregex|rr=s'   => \$restart_regex, 
     39    'restartdirectory=s'  => \$restart_directory, 
    3640); 
    3741 
     
    5054 
    5155Vee->run( $port, $host, { 
    52     argv          => \@argv, 
    53     'fork'        => $fork, 
    54     keepalive     => $keepalive, 
    55     restart       => $restart, 
    56     restart_delay => $restart_delay, 
    57     restart_regex => qr/$restart_regex/ 
     56    argv              => \@argv, 
     57    'fork'            => $fork, 
     58    keepalive         => $keepalive, 
     59    restart           => $restart, 
     60    restart_delay     => $restart_delay, 
     61    restart_regex     => qr/$restart_regex/, 
     62    restart_directory => $restart_directory, 
    5863} ); 
    5964 
     
    7681   -p -port           port (defaults to 3000) 
    7782   -k -keepalive      enable keep-alive connections 
    78    -r -restart        restart when files got modified 
     83   -r -restart        restart when files get modified 
    7984                      (defaults to false) 
    8085   -rd -restartdelay  delay between file checks 
     
    8287                      a restart when modified 
    8388                      (defaults to '\.yml$|\.yaml$|\.pm$') 
     89   -restartdirectory  the directory to search for 
     90                      modified files 
     91                      (defaults to '../') 
    8492 
    8593 See also: 
     
    94102 
    95103Sebastian Riedel, C<sri@oook.de> 
     104Maintained by the Catalyst Core Team. 
    96105 
    97106=head1 COPYRIGHT 
    98  
    99 Copyright 2004 Sebastian Riedel. All rights reserved. 
    100107 
    101108This library is free software, you can redistribute it and/or modify 
  • veekun/trunk/script/vee_test.pl

    r1 r255  
    1 #!C:\Perl\bin\perl.exe -w 
     1#!/usr/bin/perl -w 
    22 
    33use strict; 
     4use warnings; 
    45use Getopt::Long; 
    56use Pod::Usage; 
     
    4445 
    4546Sebastian Riedel, C<sri@oook.de> 
     47Maintained by the Catalyst Core Team. 
    4648 
    4749=head1 COPYRIGHT 
    48  
    49 Copyright 2004 Sebastian Riedel. All rights reserved. 
    5050 
    5151This library is free software, you can redistribute it and/or modify