Form/ImageInput.pm

filter: Statementstmt 100% 15 / 15 Branchbran 66.6% 4 / 6 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 83.3% 25 / 30 CC 5 SCAR 13.8
CC
5
Cov
88%
form_name_value
5.2
BEGIN
1.0
BEGIN
1.0
CRAP 4.0
« Form/FileInput.pm ↑ Summary Form/SubmitInput.pm »
1 package HTML::Form::ImageInput;
2  
3 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 11 ▶use parent 'HTML::Form::SubmitInput';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 11 our $VERSION = '6.13';
7  
8 # ABSTRACT: An HTML form image input element for use with HTML::Form
9  
10 2 ▶sub form_name_value {
Subroutine form_name_value: called CC=5 SCAR=16.4
Pod undocumented
11 2 my $self = shift;
12 2 my $clicked = $self->{clicked};
13 2 ▶ return unless $clicked;
Branch: 1 branch
BranchTrueFalseTotal
unless $clicked 0 2 2
14 2 ▶ return if $self->{disabled};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"disabled"} 0 2 2
15 2 my $name = $self->{name};
16 2 ▶ $name = ( defined($name) && length($name) ) ? "$name." : "";
Branch: 1 branch
BranchTrueFalseTotal
defined $name && length $name ? : 1 1 2
Condition66%2/3
defined $name and length $name
!ll&&!rl&&r
101
MC/DC50%1/2
defined $name and length $name
defined $name length $name
Truth table66%2/3
A and B
A= defined $nameB= length $name
ABresult
0X0
100
111
17 return (
18 2 "${name}x" => $clicked->[0],
19 "${name}y" => $clicked->[1]
20 );
21 }
22  
23 11 1;
24  
25 __END__
« Form/FileInput.pm ↑ Summary Form/SubmitInput.pm »