Line | |
---|
1 | use strict; |
---|
2 | use warnings; |
---|
3 | |
---|
4 | use Getopt::Long; |
---|
5 | use Text::FormBuilder; |
---|
6 | |
---|
7 | GetOptions( |
---|
8 | 'o=s' => \my $outfile, |
---|
9 | 'D=s' => \my %fb_options, |
---|
10 | ); |
---|
11 | my $src_file = shift; |
---|
12 | |
---|
13 | Text::FormBuilder->parse($src_file)->build(%fb_options)->write($outfile); |
---|
14 | |
---|
15 | =head1 NAME |
---|
16 | |
---|
17 | fb - Frontend script for Text::FormBuilder |
---|
18 | |
---|
19 | =head1 SYNOPSIS |
---|
20 | |
---|
21 | $ fb my_form.txt -o form.html |
---|
22 | |
---|
23 | $ fb my_form.txt -o my_form.html -D action=/cgi-bin/my-script.pl |
---|
24 | |
---|
25 | =head1 OPTIONS |
---|
26 | |
---|
27 | =over |
---|
28 | |
---|
29 | =item -D <parameter>=<value> |
---|
30 | |
---|
31 | Define options that are passed to the CGI::FormBuilder object. For example, |
---|
32 | to create a form on a static html page, and have it submitted to an external |
---|
33 | CGI script, you would want to define the C<action> parameter: |
---|
34 | |
---|
35 | $ fb ... -D action=/cgi-bin/some_script.pl |
---|
36 | |
---|
37 | =item -o <output file> |
---|
Note: See
TracBrowser
for help on using the repository browser.