- Timestamp:
- 01/03/05 13:41:53 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/fb.pl
r1 r52 11 11 my $src_file = shift; 12 12 13 Text::FormBuilder->parse($src_file)->build(%fb_options)->write($outfile); 13 create_form($src_file, \%fb_options, $outfile); 14 #Text::FormBuilder->parse($src_file)->build(%fb_options)->write($outfile); 14 15 15 16 =head1 NAME … … 23 24 $ fb my_form.txt -o my_form.html -D action=/cgi-bin/my-script.pl 24 25 26 =head1 DESCRIPTION 27 28 Parses a formspec file from the command line and creates an output 29 file. The sort of output file depends on the value given to the C<-o> 30 option. If it ends in F<.pm>, a standalone module is created. If it 31 ends in F<.pl> or F<.cgi>, a skeleton CGI script is created. Any other 32 value, will be taken as the name of an HTML file to write. Finally, if 33 not C<-o> option is given then the HTML will be written to STDOUT. 34 25 35 =head1 OPTIONS 26 36 27 37 =over 28 38 29 =item -D <parameter>=<value>39 =item C<< -D <parameter>=<value> >> 30 40 31 41 Define options that are passed to the CGI::FormBuilder object. For example, … … 35 45 $ fb ... -D action=/cgi-bin/some_script.pl 36 46 37 =item -o <output file> 47 =item C<< -o <output file> >> 48 49 Where to write output, and what form to write it in. See C<create_form> in 50 L<Text::FormBuilder> for a more detailed explanation. 51 52 # write a standalone module 53 $ fb myform -o MyForm.pm 54 55 # write a CGI script 56 $ fb myform -o form.cgi 57 58 =back 59 60 =head1 AUTHOR 61 62 Peter Eichman, C<< <peichman@cpan.org> >> 63 64 =head1 COPYRIGHT AND LICENSE 65 66 Copyright E<copy>2004 by Peter Eichman. 67 68 This program is free software; you can redistribute it and/or 69 modify it under the same terms as Perl itself. 70 71 =cut
Note: See TracChangeset
for help on using the changeset viewer.