package HTML::Form;
# $Id: Form.pm,v 1.39 2004/04/09 14:17:32 gisle Exp $
use strict;
use URI;
use Carp ();
use vars qw($VERSION);
$VERSION = sprintf("%d.%03d", q$Revision: 1.39 $ =~ /(\d+)\.(\d+)/);
my %form_tags = map {$_ => 1} qw(input textarea button select option);
my %type2class = (
text => "TextInput",
password => "TextInput",
hidden => "TextInput",
textarea => "TextInput",
button => "IgnoreInput",
"reset" => "IgnoreInput",
radio => "ListInput",
checkbox => "ListInput",
option => "ListInput",
submit => "SubmitInput",
image => "ImageInput",
file => "FileInput",
);
=head1 NAME
HTML::Form - Class that represents an HTML form element
=head1 SYNOPSIS
use HTML::Form;
$form = HTML::Form->parse($html, $base_uri);
$form->value(query => "Perl");
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
$response = $ua->request($form->click);
=head1 DESCRIPTION
Objects of the C class represents a single HTML
CformE ... E/formE> instance. A form consists of a
sequence of inputs that usually have names, and which can take on
various values. The state of a form can be tweaked and it can then be
asked to provide C objects that can be passed to the
request() method of C.
The following methods are available:
=over 4
=item @forms = HTML::Form->parse( $html_document, $base_uri )
=item @forms = HTML::Form->parse( $response )
The parse() class method will parse an HTML document and build up
C objects for each