1Fsdb::Filter::cgi_to_dbU(s3e)r Contributed Perl DocumentaFtsidobn::Filter::cgi_to_db(3)
2
3
4

NAME

6       cgi_to_db - convert stored CGI files (from CGI.pm) to fsdb
7

SYNOPSIS

9           cgi_to_db [-duU] [-e EmptyValue] [cgi-files...]
10

DESCRIPTION

12       Converts all stored CGI files (from CGI.pm) to fsdb, optionally
13       unescaping the contents.  When contents are unescaped, CR NL is recoded
14       as ``\n''.
15
16       Output is always in fsdb list format with double space (type ``S'')
17       field separator.
18
19       Unlike most Fsdb programs, the input to this program is not usually
20       from standard input.  However, the program will take "-i" options.
21
22       This program requires temporary storage equal to the size of the data
23       (so that it can handle the case of different entries having different
24       headers).
25

OPTIONS

27       -u or --unescape
28           do unescape data, converting CGI escape codes like %xx to regular
29           characters (default)
30
31       -U or --nounescape
32           do not unescape data, but leave it CGI-encoded
33
34       -e E or --empty E
35           give value E as the value for empty (null) records
36
37       -T TmpDir
38           where to put tmp files.  Also uses environment variable TMPDIR, if
39           -T is not specified.  Default is /tmp.
40
41       This module also supports the standard fsdb options:
42
43       -d  Enable debugging output.
44
45       -i or --input InputSource
46           Read from InputSource, typically a file name, or "-" for standard
47           input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
48           objects.
49
50       -o or --output OutputDestination
51           Write to OutputDestination, typically a file name, or "-" for
52           standard output, or (if in Perl) a IO::Handle, Fsdb::IO or
53           Fsdb::BoundedQueue objects.
54
55       --autorun or --noautorun
56           By default, programs process automatically, but Fsdb::Filter
57           objects in Perl do not run until you invoke the run() method.  The
58           "--(no)autorun" option controls that behavior within Perl.
59
60       --help
61           Show help.
62
63       --man
64           Show full manual.
65

SAMPLE USAGE

67   Input:
68       file A (TEST/cgi_to_db_ex.in):
69
70           name=test
71           id=111-11-1111
72           email=test%40usc.edu
73           submit_time=Tue%20Jan%2014%2011%3A32%3A39%202003
74           =
75
76       file B (TEST/cgi_to_db_ex.in-2):
77
78           name=test2
79           id=222-22-2222
80           email=test2%40usc.edu
81           newfield=foo
82           emptyfield=
83           submit_time=Tue%20Jan%2024%2022%3A32%3A39%202003
84           =
85
86   Command:
87           cgi_to_db TEST/cgi_to_db_ex.in TEST/cgi_to_db_ex.in-2
88
89   Output:
90           #fsdb -R C -F S name id email submit_time newfield emptyfield
91           name:  test
92           id:  111-11-1111
93           email:  test\@usc.edu
94           submit_time:  Tue Jan 14 11:32:39 2003
95
96           name:  test2
97           id:  222-22-2222
98           email:  test2\@usc.edu
99           newfield:  foo
100           emptyfield:  -
101           submit_time:  Tue Jan 24 22:32:39 2003
102
103           #  | cgi_to_db TEST/cgi_to_db_ex.in TEST/cgi_to_db_ex.in-2
104

SEE ALSO

106       Fsdb.  CGI(3pm).  <http://stein.cshl.org/boulder/>.
107       <http://stein.cshl.org/WWW/software/CGI/>
108

CLASS FUNCTIONS

110   new
111           $filter = new Fsdb::Filter::cgi_to_db(@arguments);
112
113       Create a new cgi_to_db object, taking command-line arguments.
114
115   set_defaults
116           $filter->set_defaults();
117
118       Internal: set up defaults.
119
120   parse_options
121           $filter->parse_options(@ARGV);
122
123       Internal: parse command-line arguments.
124
125   setup
126           $filter->setup();
127
128       Internal: setup, parse headers.
129
130   run
131           $filter->run();
132
133       Internal: run over each rows.
134
136       Copyright (C) 1991-2018 by John Heidemann <johnh@isi.edu>
137
138       This program is distributed under terms of the GNU general public
139       license, version 2.  See the file COPYING with the distribution for
140       details.
141
142
143
144perl v5.36.0                      2022-11-22        Fsdb::Filter::cgi_to_db(3)
Impressum