_____ _ ____ ____ ___
|_ _|__ ___| |_ _ _ / ___/ ___|_ _| _ _
| |/ _ \/ __| __| (_|_) | | | | _ | | (_|_)
| | __/\__ \ |_ _ _ | |__| |_| || | _ _
|_|\___||___/\__| (_|_) \____\____|___| (_|_)
_____ _ _
| ____|_ _| |_ ___ _ __ _ __ __ _| |
| _| \ \/ / __/ _ \ '__| '_ \ / _` | |
| |___ > <| || __/ | | | | | (_| | |
|_____/_/\_\\__\___|_| |_| |_|\__,_|_|
This is the README for Test::CGI::External version 0.04.
Test::CGI::External is a "module" for the Perl computer programming language, a
library of computer code to install on a computer. This document contains four
sections:
1. About - what the module does
2. Documentation - how to learn more about the module
3. Installation - how to install this module on a computer
4. Help - what to do if you get stuck
-----------------------------------------------------------------------------
1. ABOUT
Test::CGI::External - run tests on an external CGI program
Test::CGI::External is a tool for running basic checks of the
operation of a CGI (common gateway interface) program. It is meant to
be used for "sanity checks" of CGI program operation. For example if a
CGI program prints stuff on standard output before it prints its
headers, this causes an obscure server error message when running from
behind a server, so Test::CGI::External is meant for the testing stage
before the program is put onto a web server. One of the main errors
this module catches for the author is stray printf statements. If a
program with stray printf statements is uploaded to the web server and
run as a CGI program, the browser will show only a 500 Server Error
message. Another typical mistake is forgetting to make the CGI program
executable; again, this results in a weird server error.
The tested CGI program can be in any language, not just Perl;
Test::CGI::External is meant to test external programs which are
completely independent of itself. Test::CGI::External was originally
created to check the operation of CGI programs written in the C
programming language.
Test::CGI::External runs CGI programs as stand-alone programs, under a
faked CGI-like environment created by manipulating environment
variables.
In a Perl script,
my $tester = Test::CGI::External->new ();
$tester->set_cgi_executable ('example.cgi');
my %options;
$tester->run (\%options);
For example, say there is a program called "example.cgi" and it is
required to test that example.cgi produces a correct "Content-Type"
header, does not print out ill-formed headers (for example, print
debugging messages on standard output), or test whether "example.cgi"
exits with a zero status, or does not print error messages during
normal operations.
-----------------------------------------------------------------------------
2. DOCUMENTATION
You can read the documentation for the module online at the following websites:
* http://search.cpan.org/perldoc?Test::CGI::External
* http://metacpan.org/release/Test-CGI-External
(These links go to the latest version of the module.)
After installing the module, you can read the documentation on your computer
using
perldoc Test::CGI::External
-----------------------------------------------------------------------------
3. INSTALLATION
This module requires Perl version 5.0.6 or later.
To install the module from CPAN, use
cpan Test::CGI::External
If you have the App::cpanminus installer, you may prefer
cpanm Test::CGI::External
To install the module from the source file, Test-CGI-External-0.04.tar.gz,
follow this sequence of commands:
tar xfz Test-CGI-External-0.04.tar.gz
cd Test-CGI-External-0.04
perl Makefile.PL
make
make install
If you want to test the module before installing it, use "make test" after
"make" and before "make install".
-----------------------------------------------------------------------------
4. HELP
To get help with the module, you can email the author, Ben Bullock, at
<bkb@cpan.org>. If you think there is a problem in the module, you can report a
bug at
<https://github.com/benkasminbullock/test-cgi-external/issues>,
or if you want to alter the source code of Test::CGI::External, try the public
repository on github at
<https://github.com/benkasminbullock/test-cgi-external>.
-----------------------------------------------------------------------------
This README was written on Wed Apr 16 10:53:07 2014.
-----------------------------------------------------------------------------