File Coverage

blib/lib/SyForm/ViewRole/Bootstrap.pm
Criterion Covered Total %
statement 7 14 50.0
branch 0 2 0.0
condition n/a
subroutine 3 6 50.0
pod n/a
total 10 22 45.4


line stmt bran cond sub pod time code
1             package SyForm::ViewRole::Bootstrap;
2             BEGIN {
3 6     6   3847 $SyForm::ViewRole::Bootstrap::AUTHORITY = 'cpan:GETTY';
4             }
5             # ABSTRACT: Bootstrap view functions
6             $SyForm::ViewRole::Bootstrap::VERSION = '0.103';
7 6     6   44 use Moo::Role;
  6         15  
  6         43  
8 6     6   4167 use SyForm::FormBootstrap;
  6         13  
  6         1226  
9              
10             # Should be on, when the roles are dynamical
11             #use overload '""' => sub { $_[0]->html_bootstrap };
12              
13             has html_bootstrap => (
14             is => 'lazy',
15             );
16              
17             sub _build_html_bootstrap {
18 0     0     my ( $self ) = @_;
19 0           return $self->html_declare_bootstrap->as_html;
20             }
21              
22             has html_declare_bootstrap => (
23             is => 'lazy',
24             );
25              
26             sub _build_html_declare_bootstrap {
27 0     0     my ( $self ) = @_;
28 0           return $self->syform_formbootstrap->html_declare;
29             }
30              
31             has syform_formbootstrap => (
32             is => 'lazy',
33             );
34              
35             sub _build_syform_formbootstrap {
36 0     0     my ( $self ) = @_;
37             return SyForm::FormBootstrap->new(
38             syform_formhtml => $self->syform_formhtml,
39 0 0         $self->syform->has_bootstrap ? ( %{$self->syform->bootstrap} ) : (),
  0            
40             );
41             }
42              
43             1;
44              
45             __END__
46              
47             =pod
48              
49             =head1 NAME
50              
51             SyForm::ViewRole::Bootstrap - Bootstrap view functions
52              
53             =head1 VERSION
54              
55             version 0.103
56              
57             =head1 AUTHOR
58              
59             Torsten Raudssus <torsten@raudss.us>
60              
61             =head1 COPYRIGHT AND LICENSE
62              
63             This software is copyright (c) 2014 by Torsten Raudssus.
64              
65             This is free software; you can redistribute it and/or modify it under
66             the same terms as the Perl 5 programming language system itself.
67              
68             =cut