line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Shakan::Declare; |
2
|
2
|
|
|
2
|
|
49837
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
78
|
|
3
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
68
|
|
4
|
2
|
|
|
2
|
|
2011
|
use parent 'Exporter'; |
|
2
|
|
|
|
|
795
|
|
|
2
|
|
|
|
|
10
|
|
5
|
2
|
|
|
2
|
|
1536
|
use HTML::Shakan (); |
|
2
|
|
|
|
|
151
|
|
|
2
|
|
|
|
|
373
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our @EXPORT = qw(form get); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub import { |
10
|
2
|
|
|
2
|
|
16
|
my $class = shift; |
11
|
2
|
|
|
|
|
214
|
__PACKAGE__->export_to_level(1); |
12
|
2
|
|
|
|
|
2408
|
HTML::Shakan::Fields->export_to_level(1); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $FORMS; |
16
|
|
|
|
|
|
|
sub form ($@) { ## no critic. |
17
|
2
|
|
|
2
|
1
|
7
|
my ($name, @fields) = @_; |
18
|
2
|
|
|
|
|
7
|
my $pkg = caller(0); |
19
|
2
|
|
|
|
|
13
|
$FORMS->{$pkg}->{$name} = \@fields; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub get { |
23
|
3
|
|
|
3
|
1
|
9026
|
my ($class, $name, %args) = @_; |
24
|
3
|
|
33
|
|
|
23
|
$class = ref $class || $class; |
25
|
3
|
|
|
|
|
46
|
return HTML::Shakan->new( |
26
|
|
|
|
|
|
|
fields => $FORMS->{$class}->{$name}, |
27
|
|
|
|
|
|
|
%args, |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
__END__ |