line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Application::Plugin::SuperForm;
|
2
|
1
|
|
|
1
|
|
102688
|
use HTML::SuperForm;
|
|
1
|
|
|
|
|
8762
|
|
|
1
|
|
|
|
|
29
|
|
3
|
1
|
|
|
1
|
|
11
|
use strict;
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings;
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
35
|
|
5
|
1
|
|
|
1
|
|
4
|
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
226
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require Exporter;
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
@ISA = qw(Exporter AutoLoader);
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
@EXPORT = qw(
|
12
|
|
|
|
|
|
|
&superform
|
13
|
|
|
|
|
|
|
&sform
|
14
|
|
|
|
|
|
|
);
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
@EXPORT_OK = qw(
|
17
|
|
|
|
|
|
|
);
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$VERSION = '0.5';
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub superform {
|
22
|
4
|
|
|
4
|
1
|
30853
|
my $c = shift;
|
23
|
4
|
|
|
|
|
9
|
my $options = shift;
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
#
|
26
|
|
|
|
|
|
|
# Create a superform if needed and cache it for reuse.
|
27
|
|
|
|
|
|
|
#
|
28
|
4
|
100
|
|
|
|
23
|
unless ( $c->{__superform} ) {
|
29
|
1
|
|
|
|
|
5
|
$c->{__superform} = HTML::SuperForm->new( $c->query() );
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
#
|
32
|
|
|
|
|
|
|
# Use values in query to populate forms
|
33
|
|
|
|
|
|
|
#
|
34
|
1
|
|
|
|
|
2108
|
$c->{__superform}->sticky(1);
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
#
|
37
|
|
|
|
|
|
|
# If no values found in query then fall back to user defined defaults
|
38
|
|
|
|
|
|
|
#
|
39
|
1
|
|
|
|
|
49
|
$c->{__superform}->fallback(1);
|
40
|
|
|
|
|
|
|
}
|
41
|
4
|
|
|
|
|
72
|
return $c->{__superform};
|
42
|
|
|
|
|
|
|
}
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# short alias
|
45
|
|
|
|
|
|
|
*sform = \&superform;
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1;
|
48
|
|
|
|
|
|
|
__END__
|