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

Updated Catalyst scripts.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • 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