Skip to content

Commit

Permalink
skeleton example scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
leejo committed May 25, 2014
1 parent b0baf5a commit 44881ec
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
Empty file added examples/catalyst.pl
Empty file.
6 changes: 6 additions & 0 deletions examples/cgi.pl
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,6 @@
#!perl

use strict;
use warnings;

use CGI qw( :standard form -utf8 );
Empty file added examples/dancer2.pl
Empty file.
13 changes: 13 additions & 0 deletions examples/mojolicious_lite.pl
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,13 @@
#!perl

use strict;
use warnings;

use Mojolicious::Lite;

get '/' => sub {
my $self = shift;
$self->render( text => "Hello World" );
};

app->start;
18 changes: 18 additions & 0 deletions examples/psgi.pl
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,18 @@
#!perl

use strict;
use warnings;

use Plack::Request;

my $app = sub {
my $env = shift;
my $req = Plack::Request->new($env);
my $params = $req->parameters;
return [ 200,
[ "Content-Type" => "text/plain" ],
[ map { sprintf( "%s = %s\n",$_ => $params->get($_) ) } $params->keys ]
];
};

Plack::Handler::CGI->new->run($app);

0 comments on commit 44881ec

Please sign in to comment.