File Coverage

blib/lib/Form/Factory/Interface/HTML/Widget/List.pm
Criterion Covered Total %
statement 4 11 36.3
branch n/a
condition n/a
subroutine 2 4 50.0
pod 0 3 0.0
total 6 18 33.3


line stmt bran cond sub pod time code
1             package Form::Factory::Interface::HTML::Widget::List;
2             $Form::Factory::Interface::HTML::Widget::List::VERSION = '0.022';
3 1     1   4 use Moose;
  1         1  
  1         10  
4              
5             extends qw( Form::Factory::Interface::HTML::Widget::Element );
6              
7             # ABSTRACT: HTML interface widget helper
8              
9              
10             has '+tag_name' => (
11             default => 'ul',
12             );
13              
14             has items => (
15             is => 'ro',
16             isa => 'ArrayRef[Form::Factory::Interface::HTML::Widget::ListItem]',
17             required => 1,
18             default => sub { [] },
19             );
20              
21 0     0 0 0 sub has_content { 1 }
22              
23             sub render_items {
24 0     0 0 0 my $self = shift;
25 0         0 my $content = '';
26 0         0 for my $item (@{ $self->items }) {
  0         0  
27 0         0 $content .= $item->render;
28             }
29 0         0 return $content;
30             }
31              
32             override render_content => sub {
33             my $self = shift;
34             return super() . $self->render_items;
35             };
36              
37 130     130 0 992 sub consume_control { }
38              
39              
40             __PACKAGE__->meta->make_immutable;
41              
42             __END__
43              
44             =pod
45              
46             =encoding UTF-8
47              
48             =head1 NAME
49              
50             Form::Factory::Interface::HTML::Widget::List - HTML interface widget helper
51              
52             =head1 VERSION
53              
54             version 0.022
55              
56             =head1 DESCRIPTION
57              
58             Move along. Nothing to see here.
59              
60             =for Pod::Coverage .*
61              
62             =head1 AUTHOR
63              
64             Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
65              
66             =head1 COPYRIGHT AND LICENSE
67              
68             This software is copyright (c) 2015 by Qubling Software LLC.
69              
70             This is free software; you can redistribute it and/or modify it under
71             the same terms as the Perl 5 programming language system itself.
72              
73             =cut