CGI-Form-Table
view release on metacpan or search on metacpan
lib/CGI/Form/Table.pm view on Meta::CPAN
87888990919293949596979899100101102103104105106107=cut
sub new {
my ($class, %arg) = @_;
return unless $arg{columns};
return unless $arg{prefix};
$arg{initial_rows} = 1 unless $arg{initial_rows};
$arg{initial_rows} = @{$arg{initial_values}}
if ($arg{initial_values} && @{$arg{initial_values}} > $arg{initial_rows});
bless \%arg => $class;
}
=head2 C<< $form->as_html >>
This returns HTML representing the form object. JavaScript is required to make
the form expandible/shrinkable; see the C<javascript> method. (L</"SEE ALSO">)
=cut
sub
as_html {
lib/CGI/Form/Table/Reader.pm view on Meta::CPAN
313233343536373839404142434445464748495051=head1 METHODS
=head2 C<< CGI::Form::Table::Reader->new(query => $query, prefix => $prefix) >>
=cut
sub
new {
my
(
$class
,
%args
) =
@_
;
return
unless
$args
{prefix} and
$args
{query};
bless
\
%args
=>
$class
;
}
=head2 C<< CGI::Form::Table::Reader->rows >>
Returns an arrayref of hashrefs from the CGI inputs with the given prefix.
=cut
sub
rows {
my
(
$self
) =
@_
;
( run in 0.578 second using v1.01-cache-2.11-cpan-cba739cd03b )