line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::FillInFormLite; |
2
|
2
|
|
|
2
|
|
1982
|
use 5.008005; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
94
|
|
3
|
2
|
|
|
2
|
|
868
|
use Mojo::Base 'Mojolicious::Plugin'; |
|
2
|
|
|
|
|
11288
|
|
|
2
|
|
|
|
|
16
|
|
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
3569
|
use HTML::FillInForm::Lite; |
|
2
|
|
|
|
|
9289
|
|
|
2
|
|
|
|
|
483
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = "0.02"; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub register { |
11
|
1
|
|
|
1
|
1
|
73
|
my ($self, $app, $conf) = @_; |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
50
|
|
|
5
|
$conf ||= {}; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
$app->helper(render_fillinform => sub { |
16
|
1
|
|
|
1
|
|
50323
|
my $c = shift; |
17
|
1
|
|
|
|
|
4
|
my $params = shift; |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
8
|
my $html = $c->render(partial => 1, 'mojo.to_string' => 1, @_); |
20
|
1
|
|
|
|
|
7071
|
my $fill = HTML::FillInForm::Lite->new( |
21
|
|
|
|
|
|
|
fill_password => 1, |
22
|
|
|
|
|
|
|
%$conf, |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
|
|
129
|
$c->render( |
26
|
|
|
|
|
|
|
text => $fill->fill(\$html, $params), |
27
|
|
|
|
|
|
|
format => 'html', |
28
|
|
|
|
|
|
|
); |
29
|
1
|
|
|
|
|
15
|
}); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
__END__ |