source: text-formbuilder/trunk/bin/fb.pl @ 1

Last change on this file since 1 was 1, checked in by peter, 20 years ago

initial import

File size: 762 bytes
Line 
1use strict;
2use warnings;
3
4use Getopt::Long;
5use Text::FormBuilder;
6
7GetOptions(
8    'o=s' => \my $outfile,
9    'D=s' => \my %fb_options,
10);
11my $src_file = shift;
12
13Text::FormBuilder->parse($src_file)->build(%fb_options)->write($outfile);
14
15=head1 NAME
16
17fb - 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
31Define options that are passed to the CGI::FormBuilder object. For example,
32to create a form on a static html page, and have it submitted to an external
33CGI 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.