CGI-Snapp-Demo-Two

 view release on metacpan or  search on metacpan

httpd/cgi-bin/cgi.snapp.two.psgi  view on Meta::CPAN

#!/usr/bin/env perl
#
# Run with:
# starman -l 127.0.0.1:5172 --workers 1 httpd/cgi-bin/cgi.snapp.two.psgi &
# or, for more debug output:
# plackup -l 127.0.0.1:5172 httpd/cgi-bin/cgi.snapp.two.psgi &

use strict;
use warnings;

use CGI;
use CGI::Emulate::PSGI;
use CGI::Snapp::Demo::Two;

lib/CGI/Snapp/Demo/Two.pm  view on Meta::CPAN

Edit httpd/cgi-bin/cgi.snapp.two.psgi and change my value for the web server's doc root from /dev/shm/html to match your set up.

/dev/shm/ is a directory provided by L<Debian|http://www.debian.org/> which is actually a RAM disk, and within that my doc root is the sub-directory /dev/shm/html/.

Then, install L<Plack> and L<Starman> and then do one or both of:

=over 4

=item o Use L<Starman>

Start starman with: starman -l 127.0.0.1:5172 --workers 1 httpd/cgi-bin/cgi.snapp.two.psgi &

=item o Use L<Plack>

Start plackup with: plackup -l 127.0.0.1:5172 httpd/cgi-bin/cgi.snapp.two.psgi &

=back

Then, with either starman or plackup, direct your browser to hit 127.0.0.1:5172/.

These commands are copied from comments within httpd/cgi-bin/cgi.snapp.two.psgi. The value 5172 is of course just a suggestion. All demos in this series use port 5171 and up.

=back

=head1 Description

Shows how to write a CGI script using L<CGI::Snapp>, with several run modes.

The output reports which methods were and were not entered per run mode.



( run in 1.060 second using v1.01-cache-2.11-cpan-e93a5daba3e )