CGI-Snapp-Demo-One
view release on metacpan or search on metacpan
httpd/cgi-bin/cgi.snapp.one.psgi view on Meta::CPAN
#!/usr/bin/env perl
#
# Run with:
# starman -l 127.0.0.1:5171 --workers 1 httpd/cgi-bin/cgi.snapp.one.psgi &
# or, for more debug output:
# plackup -l 127.0.0.1:5171 httpd/cgi-bin/cgi.snapp.one.psgi &
use strict;
use warnings;
use CGI;
use CGI::Emulate::PSGI;
use CGI::Snapp::Demo::One;
lib/CGI/Snapp/Demo/One.pm view on Meta::CPAN
Edit httpd/cgi-bin/cgi.snapp.one.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/or 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:5171 --workers 1 httpd/cgi-bin/cgi.snapp.one.psgi &
=item o Use L<Plack>
Start plackup with: plackup -l 127.0.0.1:5171 httpd/cgi-bin/cgi.snapp.one.psgi &
=back
Then, with either starman or plackup, direct your browser to hit 127.0.0.1:5171/.
These commands are copied from comments within httpd/cgi-bin/cgi.snapp.one.psgi. The value 5171 is of course just a suggestion. All demos in this series use port 5171 and up.
=back
=head1 Description
Shows how to write a minimal CGI script using L<CGI::Snapp>, with 1 run mode.
=head1 Distributions
( run in 0.477 second using v1.01-cache-2.11-cpan-e93a5daba3e )