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 SCAR 6.9
CC
2
Cov
95%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« lib/HTML/FormFu/Constraint/Required.pm ↑ Summary lib/HTML/FormFu/Plugin/StashValid.pm »
1 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package HTML::FormFu::Element::Image;
4 3 $HTML::FormFu::Element::Image::VERSION = '2.06';
5 # ABSTRACT: Image button form field
6  
7 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 3 extends 'HTML::FormFu::Element::Button';
10  
11 3 __PACKAGE__->mk_attr_accessors(qw( src width height ));
12  
13 after BUILD => sub {
14 4 ▶ my $self = shift;
Subroutine __ANON__: called CC=2 SCAR=7.0
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 3 };
24  
25 3 __PACKAGE__->meta->make_immutable;
26  
27 3 1;
28  
29 __END__
30  
31 =pod
32  
33 =encoding UTF-8
34  
35 =head1 NAME
36  
37 HTML::FormFu::Element::Image - Image button form field
38  
39 =head1 VERSION
40  
41 version 2.06
42  
43 =head1 SYNOPSIS
44  
45 $e = $form->element( Image => 'foo' );
46  
47 =head1 DESCRIPTION
48  
49 Image button form field.
50  
51 =head1 METHODS
52  
53 =head1 SEE ALSO
54  
55 Is a sub-class of, and inherits methods from
56 L<HTML::FormFu::Element::Button>,
57 L<HTML::FormFu::Role::Element::Input>,
58 L<HTML::FormFu::Role::Element::Field>,
59 L<HTML::FormFu::Element>
60  
61 L<HTML::FormFu>
62  
63 =head1 AUTHOR
64  
65 Carl Franks, C<cfranks@cpan.org>
66  
67 =head1 LICENSE
68  
69 This library is free software, you can redistribute it and/or modify it under
70 the same terms as Perl itself.
71  
72 =head1 AUTHOR
73  
74 Carl Franks <cpan@fireartist.com>
75  
76 =head1 COPYRIGHT AND LICENSE
77  
78 This software is copyright (c) 2018 by Carl Franks.
79  
80 This is free software; you can redistribute it and/or modify it under
81 the same terms as the Perl 5 programming language system itself.
82  
83 =cut
« lib/HTML/FormFu/Constraint/Required.pm ↑ Summary lib/HTML/FormFu/Plugin/StashValid.pm »