CGI-Form-Table

 view release on metacpan or  search on metacpan

lib/CGI/Form/Table.pm  view on Meta::CPAN

87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
=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

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
=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 )