cgi_to_db - convert stored CGI files (from CGI.pm) to fsdb
cgi_to_db [-duU] [-e EmptyValue] [cgi-files...]
Converts all stored CGI files (from CGI.pm) to fsdb, optionally unescaping the contents. When contents are unescaped, CR NL is recoded as ``\n''.
Output is always in fsdb list format with double space (type ``S'') field separator.
Unlike most Fsdb programs, the input to this program is not usually from standard input. However, the program will take -i options.
-i
This program requires temporary storage equal to the size of the data (so that it can handle the case of different entries having different headers).
do unescape data, converting CGI escape codes like %xx to regular characters (default)
do not unescape data, but leave it CGI-encoded
give value E as the value for empty (null) records
where to put tmp files. Also uses environment variable TMPDIR, if -T is not specified. Default is /tmp.
This module also supports the standard fsdb options:
Enable debugging output.
Read from InputSource, typically a file name, or - for standard input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue objects.
-
Write to OutputDestination, typically a file name, or - for standard output, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue objects.
By default, programs process automatically, but Fsdb::Filter objects in Perl do not run until you invoke the run() method. The --(no)autorun option controls that behavior within Perl.
--(no)autorun
Show help.
Show full manual.
file A (TEST/cgi_to_db_ex.in):
name=test id=111-11-1111 email=test%40usc.edu submit_time=Tue%20Jan%2014%2011%3A32%3A39%202003 =
file B (TEST/cgi_to_db_ex.in-2):
name=test2 id=222-22-2222 email=test2%40usc.edu newfield=foo emptyfield= submit_time=Tue%20Jan%2024%2022%3A32%3A39%202003 =
cgi_to_db TEST/cgi_to_db_ex.in TEST/cgi_to_db_ex.in-2
#fsdb -R C -F S name id email submit_time newfield emptyfield name: test id: 111-11-1111 email: test\@usc.edu submit_time: Tue Jan 14 11:32:39 2003 name: test2 id: 222-22-2222 email: test2\@usc.edu newfield: foo emptyfield: - submit_time: Tue Jan 24 22:32:39 2003 # | cgi_to_db TEST/cgi_to_db_ex.in TEST/cgi_to_db_ex.in-2
Fsdb. CGI(3pm). http://stein.cshl.org/boulder/. http://stein.cshl.org/WWW/software/CGI/
$filter = new Fsdb::Filter::cgi_to_db(@arguments);
Create a new cgi_to_db object, taking command-line arguments.
$filter->set_defaults();
Internal: set up defaults.
$filter->parse_options(@ARGV);
Internal: parse command-line arguments.
$filter->setup();
Internal: setup, parse headers.
$filter->run();
Internal: run over each rows.
Copyright (C) 1991-2018 by John Heidemann <johnh@isi.edu>
This program is distributed under terms of the GNU general public license, version 2. See the file COPYING with the distribution for details.
To install Fsdb, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Fsdb
CPAN shell
perl -MCPAN -e shell install Fsdb
For more information on module installation, please visit the detailed CPAN module installation guide.