lib/HTML/FormFu/Element/Image.pm

filter: Statementstmt 100% 17 / 17 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 95.4% 21 / 22 CC 2 SCAR 4.1
CC
2
Cov
95%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« lib/HTML/FormFu/Constraint/Required.pm ↑ Summary lib/HTML/FormFu/Plugin/StashValid.pm »
1 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package HTML::FormFu::Element::Image;
4 5 $HTML::FormFu::Element::Image::VERSION = '2.09';
5 # ABSTRACT: Image button form field
6  
7 5 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 5 extends 'HTML::FormFu::Element::Button';
10  
11 5 __PACKAGE__->mk_attr_accessors(qw( src width height ));
12  
13 4 ▶after BUILD => sub {
Subroutine __ANON__: called CC=2 SCAR=7.0
14 4 my $self = shift;
15  
16 4 $self->field_type('image');
17  
18 4 ▶ if ( !defined $self->src ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $self->src) 4 0 4
19 4 $self->src('');
20 }
21  
22 4 return;
23 5 };
24  
25 5 __PACKAGE__->meta->make_immutable;
26  
27 5 1;
28  
29 __END__
« lib/HTML/FormFu/Constraint/Required.pm ↑ Summary lib/HTML/FormFu/Plugin/StashValid.pm »