From 2dd592c0b04478695d3b5b32744ac09466387a78 Mon Sep 17 00:00:00 2001 From: dakkar Date: Wed, 19 Oct 2005 18:28:34 +0000 Subject: template iniziale --- script/bookmarks_cgi.pl | 37 ++++++++++++++++++++++++++ script/bookmarks_create.pl | 65 +++++++++++++++++++++++++++++++++++++++++++++ script/bookmarks_fastcgi.pl | 37 ++++++++++++++++++++++++++ script/bookmarks_server.pl | 57 +++++++++++++++++++++++++++++++++++++++ script/bookmarks_test.pl | 56 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 252 insertions(+) create mode 100755 script/bookmarks_cgi.pl create mode 100755 script/bookmarks_create.pl create mode 100755 script/bookmarks_fastcgi.pl create mode 100755 script/bookmarks_server.pl create mode 100755 script/bookmarks_test.pl (limited to 'script') diff --git a/script/bookmarks_cgi.pl b/script/bookmarks_cgi.pl new file mode 100755 index 0000000..473bb30 --- /dev/null +++ b/script/bookmarks_cgi.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl -w + +BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' } + +use strict; +use FindBin; +use lib "$FindBin::Bin/../lib"; +use Bookmarks; + +Bookmarks->run; + +1; + +=head1 NAME + +bookmarks_cgi.pl - Catalyst CGI + +=head1 SYNOPSIS + +See L + +=head1 DESCRIPTION + +Run a Catalyst application as cgi. + +=head1 AUTHOR + +Sebastian Riedel, C + +=head1 COPYRIGHT + +Copyright 2004 Sebastian Riedel. All rights reserved. + +This library is free software. You can redistribute it and/or modify +it under the same terms as perl itself. + +=cut diff --git a/script/bookmarks_create.pl b/script/bookmarks_create.pl new file mode 100755 index 0000000..4dceeba --- /dev/null +++ b/script/bookmarks_create.pl @@ -0,0 +1,65 @@ +#!/usr/bin/perl -w + +use strict; +use Getopt::Long; +use Pod::Usage; +use Catalyst::Helper; + +my $help = 0; +my $nonew = 0; + +GetOptions( 'help|?' => \$help, + 'nonew' => \$nonew ); + +pod2usage(1) if ( $help || !$ARGV[0] ); + +my $helper = Catalyst::Helper->new({'.newfiles' => !$nonew}); +pod2usage(1) unless $helper->mk_component( 'Bookmarks', @ARGV ); + +1; + +=head1 NAME + +bookmarks_create.pl - Create a new Catalyst Component + +=head1 SYNOPSIS + +bookmarks_create.pl [options] model|view|controller name [helper] [options] + + Options: + -help display this help and exits + -nonew don't create a .new file where a file to be created exists + + Examples: + bookmarks_create.pl controller My::Controller + bookmarks_create.pl view My::View + bookmarks_create.pl view MyView TT + bookmarks_create.pl view TT TT + bookmarks_create.pl model My::Model + bookmarks_create.pl model SomeDB CDBI dbi:SQLite:/tmp/my.db + bookmarks_create.pl model AnotherDB CDBI dbi:Pg:dbname=foo root 4321 + + See also: + perldoc Catalyst::Manual + perldoc Catalyst::Manual::Intro + +=head1 DESCRIPTION + +Create a new Catalyst Component. + +Existing component files are not overwritten. If any of the component files +to be created already exist the file will be written with a '.new' suffix. +This behaviour can be supressed with the C<-nonew> option. + +=head1 AUTHOR + +Sebastian Riedel, C + +=head1 COPYRIGHT + +Copyright 2004 Sebastian Riedel. All rights reserved. + +This library is free software. You can redistribute it and/or modify +it under the same terms as perl itself. + +=cut diff --git a/script/bookmarks_fastcgi.pl b/script/bookmarks_fastcgi.pl new file mode 100755 index 0000000..7061403 --- /dev/null +++ b/script/bookmarks_fastcgi.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl -w + +BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' } + +use strict; +use FindBin; +use lib "$FindBin::Bin/../lib"; +use Bookmarks; + +Bookmarks->run; + +1; + +=head1 NAME + +bookmarks_fastcgi.pl - Catalyst FastCGI + +=head1 SYNOPSIS + +See L + +=head1 DESCRIPTION + +Run a Catalyst application as fastcgi. + +=head1 AUTHOR + +Sebastian Riedel, C + +=head1 COPYRIGHT + +Copyright 2004 Sebastian Riedel. All rights reserved. + +This library is free software. You can redistribute it and/or modify +it under the same terms as perl itself. + +=cut diff --git a/script/bookmarks_server.pl b/script/bookmarks_server.pl new file mode 100755 index 0000000..ac117e0 --- /dev/null +++ b/script/bookmarks_server.pl @@ -0,0 +1,57 @@ +#!/usr/bin/perl -w + +BEGIN { + $ENV{CATALYST_ENGINE} ||= 'HTTP'; + $ENV{CATALYST_SCRIPT_GEN} = 4; +} + +use strict; +use Getopt::Long; +use Pod::Usage; +use FindBin; +use lib "$FindBin::Bin/../lib"; +use Bookmarks; + +my $help = 0; +my $port = 3000; + +GetOptions( 'help|?' => \$help, 'port=s' => \$port ); + +pod2usage(1) if $help; + +Bookmarks->run($port); + +1; + +=head1 NAME + +bookmarks_server.pl - Catalyst Testserver + +=head1 SYNOPSIS + +bookmarks_server.pl [options] + + Options: + -? -help display this help and exits + -p -port port (defaults to 3000) + + See also: + perldoc Catalyst::Manual + perldoc Catalyst::Manual::Intro + +=head1 DESCRIPTION + +Run a Catalyst Testserver for this application. + +=head1 AUTHOR + +Sebastian Riedel, C + +=head1 COPYRIGHT + +Copyright 2004 Sebastian Riedel. All rights reserved. + +This library is free software. You can redistribute it and/or modify +it under the same terms as perl itself. + +=cut diff --git a/script/bookmarks_test.pl b/script/bookmarks_test.pl new file mode 100755 index 0000000..9476a7d --- /dev/null +++ b/script/bookmarks_test.pl @@ -0,0 +1,56 @@ +#!/usr/bin/perl -w + +BEGIN { $ENV{CATALYST_ENGINE} ||= 'Test' } + +use strict; +use Getopt::Long; +use Pod::Usage; +use FindBin; +use lib "$FindBin::Bin/../lib"; +use Bookmarks; + +my $help = 0; + +GetOptions( 'help|?' => \$help ); + +pod2usage(1) if ( $help || !$ARGV[0] ); + +print Bookmarks->run($ARGV[0])->content . "\n"; + +1; + +=head1 NAME + +bookmarks_test.pl - Catalyst Test + +=head1 SYNOPSIS + +bookmarks_test.pl [options] uri + + Options: + -help display this help and exits + + Examples: + bookmarks_test.pl http://localhost/some_action + bookmarks_test.pl /some_action + + See also: + perldoc Catalyst::Manual + perldoc Catalyst::Manual::Intro + +=head1 DESCRIPTION + +Run a Catalyst action from the comand line. + +=head1 AUTHOR + +Sebastian Riedel, C + +=head1 COPYRIGHT + +Copyright 2004 Sebastian Riedel. All rights reserved. + +This library is free software. You can redistribute it and/or modify +it under the same terms as perl itself. + +=cut -- cgit v1.2.3