line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Ark::ActionClass::Form; |
2
|
2
|
|
|
2
|
|
1016
|
use Mouse::Role; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
12
|
|
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
1468
|
use Ark::Form; |
|
2
|
|
|
|
|
185
|
|
|
2
|
|
|
|
|
817
|
|
5
|
|
|
|
|
|
|
|
6
|
11
|
|
|
11
|
0
|
358
|
sub form { shift->{form} } |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
around ACTION => sub { |
9
|
|
|
|
|
|
|
my $orig = shift; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my ($self, $action, $context, @args) = @_; |
12
|
|
|
|
|
|
|
my $form_class = $action->attributes->{Form}->[0]; |
13
|
|
|
|
|
|
|
if ($form_class) { |
14
|
|
|
|
|
|
|
local $self->{form}; |
15
|
|
|
|
|
|
|
$context->ensure_class_loaded($form_class); |
16
|
|
|
|
|
|
|
my $form = $form_class->new( $context->request, $context ); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
$context->stash->{form} = $form; |
19
|
|
|
|
|
|
|
$self->{form} = $form; |
20
|
|
|
|
|
|
|
$orig->(@_); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
else { |
23
|
|
|
|
|
|
|
$orig->(@_); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
|
27
|
2
|
|
|
2
|
|
19
|
no Mouse::Role; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
31
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub _parse_Form_attr { |
30
|
30
|
|
|
30
|
|
48334
|
my ($self, $name, $value) = @_; |
31
|
30
|
|
|
|
|
111
|
return Form => $value; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|