NAME
HTML::FillInForm::Lite - Fills in HTML forms with data
VERSION
The document describes HTML::FillInForm version 0.02
SYNOPSIS
use HTML::FillInForm::Lite;
use CGI;
my $q = CGI->new();
my $h = HTML::FillInForm::Lite->new();
$output = $h->fill(\$html, $q);
$output = $h->fill(\@html, \%data);
$output = $h->fill(\*HTML, \&get_param);
$output = $h->fill('t.html', [$q, \%default]);
$output = $h->fill(\$html, $q,
fill_password => 0, # it is default
ignore_fields => ['foo', 'bar'],
# or disable_fields => [...]
ignore_types => ['textarea'],
target => $form_id,
);
DESCRIPTION
This module fills in HTML forms with Perl data, which re-implements HTML::FillInForm
using regexp-based parser, not using HTML::Parser
.
The difference of the parser makes HTML::FillInForm::Lite
2 or more times faster than HTML::FillInForm
.
METHODS
new(options...)
Creates HTML::FillInForm::Lite
processer with options.
Acceptable options are:
- fill_password => bool_value
-
Different from
HTML::FillInForm
, thefill()
method ignores passwords by default.Setting the option true, to enable passwords to be filled in.
- ignore_fields => array_ref_of_fields
- disable_fields => array_ref_of_fields
-
To ignore some fields from filling.
- ignore_type => array_ref_of_types
-
To ignore some types from filling.
- target => form_id
-
To fill in just the form identified by form_id.
fill(source, form_data [, options...])
Fills in source with form_data.
The options are the same as new()
's.
You can use this method as both class or instance method.
Note that if you make multiple calls to fill()
with the same options, it is more faster to call new()
before fill()
.
LIMITATIONS
Compatibility with HTML::FillInForm
This module implements only the new syntax of HTML::FillInForm
version 2.
Compatibility with legacy HTML
Fundamentrally it understands HTML 4.x and XHTML 1.x, but it doesn't understand html-attributes that the name is omitted.
For example:
<INPUT TYPE=checkbox NAME=foo CHECKED> -- NG.
<INPUT TYPE=checkbox NAME=foo CHECKED=CHECKED> -- OK, but it's obsolete.
<input type="checkbox" name="foo" checked="checked" /> -- OK, it's valid XHTML
And it always treats the values of attributes case-sensitively. In the example above, the value of type
must be lower-case.
SEE ALSO
AUTHOR
Goro Fuji (藤 吾郎) <gfuji(at)cpan.org>
LICENSE AND COPYRIGHT
Copyright (c) 2008 Goro Fuji, Some rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 511:
=back without =over