line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
1863
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
175
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package HTML::FormFu::Role::Element::NonBlock; |
4
|
|
|
|
|
|
|
$HTML::FormFu::Role::Element::NonBlock::VERSION = '2.07'; |
5
|
|
|
|
|
|
|
# ABSTRACT: base class for single-tag elements |
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
19
|
use Moose::Role; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
25
|
|
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
16257
|
use HTML::FormFu::Util qw( process_attrs ); |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
876
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has tag => ( is => 'rw', traits => ['Chained'] ); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
after BUILD => sub { |
14
|
|
|
|
|
|
|
my $self = shift; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
$self->filename('non_block'); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
return; |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
around render_data_non_recursive => sub { |
22
|
|
|
|
|
|
|
my ( $orig, $self, $args ) = @_; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
my $render = $self->$orig( |
25
|
|
|
|
|
|
|
{ tag => $self->tag, |
26
|
|
|
|
|
|
|
$args ? %$args : (), |
27
|
|
|
|
|
|
|
} ); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
return $render; |
30
|
|
|
|
|
|
|
}; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub string { |
33
|
3
|
|
|
3
|
0
|
9
|
my ( $self, $args ) = @_; |
34
|
|
|
|
|
|
|
|
35
|
3
|
|
50
|
|
|
19
|
$args ||= {}; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $render |
38
|
|
|
|
|
|
|
= exists $args->{render_data} |
39
|
|
|
|
|
|
|
? $args->{render_data} |
40
|
3
|
50
|
|
|
|
22
|
: $self->render_data; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# non_block template |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
my $html = sprintf "<%s%s />", |
45
|
|
|
|
|
|
|
$render->{tag}, |
46
|
3
|
|
|
|
|
14
|
process_attrs( $render->{attributes} ), |
47
|
|
|
|
|
|
|
; |
48
|
|
|
|
|
|
|
|
49
|
3
|
|
|
|
|
23
|
return $html; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=pod |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=encoding UTF-8 |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 NAME |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
HTML::FormFu::Role::Element::NonBlock - base class for single-tag elements |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 VERSION |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
version 2.07 |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 DESCRIPTION |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Base class for single-tag elements. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 METHODS |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head2 tag |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 SEE ALSO |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Is a sub-class of, and inherits methods from L<HTML::FormFu::Element> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
L<HTML::FormFu> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 AUTHOR |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Carl Franks, C<cfranks@cpan.org> |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 LICENSE |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
89
|
|
|
|
|
|
|
the same terms as Perl itself. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 AUTHOR |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Carl Franks <cpan@fireartist.com> |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
This software is copyright (c) 2018 by Carl Franks. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
100
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=cut |