line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormFu::Role::Element::NonBlock; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
1550
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
151
|
|
4
|
|
|
|
|
|
|
our $VERSION = '2.05'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
12
|
use Moose::Role; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
25
|
|
7
|
3
|
|
|
3
|
|
10359
|
use MooseX::Attribute::FormFuChained; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
71
|
|
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
10
|
use HTML::FormFu::Util qw( process_attrs ); |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
683
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has tag => ( is => 'rw', traits => ['FormFuChained'] ); |
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
|
6
|
my ( $self, $args ) = @_; |
34
|
|
|
|
|
|
|
|
35
|
3
|
|
50
|
|
|
20
|
$args ||= {}; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $render |
38
|
|
|
|
|
|
|
= exists $args->{render_data} |
39
|
|
|
|
|
|
|
? $args->{render_data} |
40
|
3
|
50
|
|
|
|
21
|
: $self->render_data; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# non_block template |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
my $html = sprintf "<%s%s />", |
45
|
|
|
|
|
|
|
$render->{tag}, |
46
|
3
|
|
|
|
|
12
|
process_attrs( $render->{attributes} ), |
47
|
|
|
|
|
|
|
; |
48
|
|
|
|
|
|
|
|
49
|
3
|
|
|
|
|
16
|
return $html; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 NAME |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
HTML::FormFu::Role::Element::NonBlock - base class for single-tag elements |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 VERSION |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
version 2.05 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 DESCRIPTION |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Base class for single-tag elements. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 METHODS |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 tag |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 SEE ALSO |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Is a sub-class of, and inherits methods from L<HTML::FormFu::Element> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
L<HTML::FormFu> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 AUTHOR |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Carl Franks, C<cfranks@cpan.org> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 LICENSE |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
85
|
|
|
|
|
|
|
the same terms as Perl itself. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=cut |