line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catalyst::Plugin::SuperForm; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
793
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
40
|
|
4
|
1
|
|
|
1
|
|
1007
|
use HTML::SuperForm; |
|
1
|
|
|
|
|
5681
|
|
|
1
|
|
|
|
|
25
|
|
5
|
1
|
|
|
1
|
|
18
|
use HTML::SuperForm::Field; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
14
|
|
6
|
1
|
|
|
1
|
|
832
|
use HTML::SuperForm::Field::Checkbox; |
|
1
|
|
|
|
|
274
|
|
|
1
|
|
|
|
|
21
|
|
7
|
1
|
|
|
1
|
|
800
|
use HTML::SuperForm::Field::CheckboxGroup; |
|
1
|
|
|
|
|
1659
|
|
|
1
|
|
|
|
|
24
|
|
8
|
1
|
|
|
1
|
|
903
|
use HTML::SuperForm::Field::Hidden; |
|
1
|
|
|
|
|
150
|
|
|
1
|
|
|
|
|
19
|
|
9
|
1
|
|
|
1
|
|
823
|
use HTML::SuperForm::Field::Password; |
|
1
|
|
|
|
|
180
|
|
|
1
|
|
|
|
|
21
|
|
10
|
1
|
|
|
1
|
|
819
|
use HTML::SuperForm::Field::Radio; |
|
1
|
|
|
|
|
242
|
|
|
1
|
|
|
|
|
24
|
|
11
|
1
|
|
|
1
|
|
828
|
use HTML::SuperForm::Field::RadioGroup; |
|
1
|
|
|
|
|
168
|
|
|
1
|
|
|
|
|
20
|
|
12
|
1
|
|
|
1
|
|
5
|
use HTML::SuperForm::Field::Select; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
556
|
|
13
|
1
|
|
|
1
|
|
831
|
use HTML::SuperForm::Field::Submit; |
|
1
|
|
|
|
|
256
|
|
|
1
|
|
|
|
|
25
|
|
14
|
1
|
|
|
1
|
|
791
|
use HTML::SuperForm::Field::Text; |
|
1
|
|
|
|
|
244
|
|
|
1
|
|
|
|
|
33
|
|
15
|
1
|
|
|
1
|
|
863
|
use HTML::SuperForm::Field::Textarea; |
|
1
|
|
|
|
|
182
|
|
|
1
|
|
|
|
|
131
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
*sform = \&superform; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub superform { |
22
|
0
|
|
|
0
|
1
|
|
my $c = shift; |
23
|
|
|
|
|
|
|
|
24
|
0
|
0
|
|
|
|
|
unless ( $c->{superform} ) { |
25
|
0
|
|
|
|
|
|
$c->{superform} = HTML::SuperForm->new( $c->request->parameters ); |
26
|
0
|
|
|
|
|
|
$c->{superform}->fallback(1); |
27
|
0
|
|
|
|
|
|
$c->{superform}->sticky(1); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return $c->{superform}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 NAME |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Catalyst::Plugin::SuperForm - Create sticky HTML forms |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 SYNOPSIS |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
use Catalyst qw[SuperForm]; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
print $c->superform->text( |
46
|
|
|
|
|
|
|
name => 'test' |
47
|
|
|
|
|
|
|
); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
print $c->superform->select( |
50
|
|
|
|
|
|
|
name => 'select', |
51
|
|
|
|
|
|
|
labels => { |
52
|
|
|
|
|
|
|
'DE' => 'Germany', |
53
|
|
|
|
|
|
|
'SE' => 'Sweden', |
54
|
|
|
|
|
|
|
'US' => 'United States' |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
# Alias |
59
|
|
|
|
|
|
|
print $c->sform->text( name => 'test' ); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 DESCRIPTION |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Create sticky forms with C<HTML::SuperForm>. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 METHODS |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=over 4 |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=item sform |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
alias to superform |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item superform |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Returns a instance of C<HTML::SuperForm>. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=back |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 SEE ALSO |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
L<HTML::SuperForm>, L<Catalyst>. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 AUTHOR |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Christian Hansen, C<ch@ngmedia.com> |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 LICENSE |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
This library is free software. You can redistribute it and/or modify |
91
|
|
|
|
|
|
|
it under the same terms as perl itself. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=cut |