File Coverage

blib/lib/HTML/Form/SubmitInput.pm
Criterion Covered Total %
statement 15 15 100.0
branch 5 6 83.3
condition n/a
subroutine 4 4 100.0
pod 0 2 0.0
total 24 27 88.8


line stmt bran cond sub pod time code
1             package HTML::Form::SubmitInput;
2              
3 11     11   73 use strict;
  11         22  
  11         349  
4 11     11   56 use parent 'HTML::Form::Input';
  11         23  
  11         54  
5              
6             our $VERSION = '6.11';
7              
8             # ABSTRACT: An HTML form submit input element for use with HTML::Form
9              
10             #input/image
11             #input/submit
12              
13             sub click {
14 6     6 0 17 my ( $self, $form, $x, $y ) = @_;
15 6 50       12 for ( $x, $y ) { $_ = 1 unless defined; }
  12         28  
16 6         20 local ( $self->{clicked} ) = [ $x, $y ];
17 6 100       50 local ( $self->{value} ) = "" unless defined $self->value;
18 6         18 return $form->make_request;
19             }
20              
21             sub form_name_value {
22 7     7 0 12 my $self = shift;
23 7 100       18 return unless $self->{clicked};
24 4         16 return $self->SUPER::form_name_value(@_);
25             }
26              
27             1;
28              
29             __END__