CGI::Echo - Echo form data to test form design.
CGI::Echo
This is complete, tested program:
#!/usr/bin/perl -wT use lib '.'; use strict; use CGI; use CGI::Echo; # ----------------------------------------------- my($q) = CGI -> new(); CGI::Echo -> new(q => $q) -> print();
This module accepts form data, cleans it, and echos it.
It is designed for a HTML/CGI student enviroment. It lets, indeed encourages, students to design forms and gives their long-suffering instructors a simple way to provide a CGI script which accepts the form data, and just echos it.
This module is available both as a Unix-style distro (*.tgz) and an ActiveState-style distro (*.ppd). The latter is shipped in a *.zip file.
See http://savage.net.au/Perl-modules/html/installing-a-module.html for help on unpacking and installing each type of distro.
See the synopsis.
Here, in alphabetical order, are the options accepted by the constructor, together with their default values.
This is the name of a CSS file which makes the sample form and the echoed data look pretty.
See examples/default.css for a sample CSS file.
This is the CGI object used by CGI::Echo to do the work.
This is the text used in the page title and as a heading when the form data is echoed.
See the previous section for details.
Call this to output a table containing the form data.
print(%arg) takes the same parameters as new().
Call this to set options after calling new().
set(%arg) takes the same parameters as new().
The synopsis in Echo.pm contains the only script you'll need. You'll find the code in examples/echo.cgi.
A sample form, examples/test-echo.html, is shipped to bootstrap the design process.
CGI::Echo was written by Ron Savage <ron@savage.net.au> in 2002.
Home page: http://savage.net.au/index.html
Australian copyright (c) 2002, Ron Savage. All Programs of mine are 'OSI Certified Open Source Software'; you can redistribute them and/or modify them under the terms of The Artistic License, a copy of which is available at: http://www.opensource.org/licenses/index.html
To install CGI::Echo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CGI::Echo
CPAN shell
perl -MCPAN -e shell install CGI::Echo
For more information on module installation, please visit the detailed CPAN module installation guide.