Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding pod as requested in Bug #87689 #16

Merged
merged 3 commits into from Oct 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions lib/HTML/Form.pm
Expand Up @@ -325,6 +325,22 @@ sub new {
$self;
}

=item $form->push_input( $type, \%attr, $verbose )

This method adds additional inputs to the form.
The first argument is the type of input (e.g. hidden, option, etc.).
The second argument is a reference to a hash of the input attributes.
The third argument is optional, and will issue warnings about unknown input types.

Example:

push_input( 'hidden', {
name => 'NewFormElement',
id => 'NewFormElementId',
value => 'some value',
});

=cut

sub push_input
{
Expand Down
8 changes: 4 additions & 4 deletions t/form.t
Expand Up @@ -128,10 +128,10 @@ EOT
my $filename = sprintf "foo-%08d.txt", $$;
die if -e $filename;

open(FILE, ">$filename") || die;
binmode(FILE);
print FILE "This is some text\n";
close(FILE) || die;
open my $file, ">", $filename || die;
binmode($file);
print $file "This is some text\n";
close($file) || die;

$f->value(f => $filename);

Expand Down