| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Validator::Group; |
|
2
|
1
|
|
|
1
|
|
3379
|
use Validator::Var; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
18
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
16
|
use 5.006; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
28
|
|
|
5
|
1
|
|
|
1
|
|
4
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
27
|
|
|
6
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
205
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Validator::Group - The great new Validator::Group! |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 VERSION |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Version 0.03 |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
use Validator::Group; |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my $foo = Validator::Group->new(); |
|
26
|
|
|
|
|
|
|
... |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head2 new |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Creates new variables validation group |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub new |
|
37
|
|
|
|
|
|
|
{ |
|
38
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
|
39
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
|
40
|
0
|
|
|
|
|
|
return $self; |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 exists( $entry_id ) |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Returns true if Validator::Var instance specified by I |
|
47
|
|
|
|
|
|
|
exists in the group. |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub exists |
|
52
|
|
|
|
|
|
|
{ |
|
53
|
0
|
|
|
0
|
1
|
|
my ($self, $vv_id) = @_; |
|
54
|
0
|
0
|
|
|
|
|
return defined $self->{$vv_id} ? 1 : 0; |
|
55
|
|
|
|
|
|
|
} |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 entry( $entry_id ) |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Returns Validator::Var instance specified by I. |
|
61
|
|
|
|
|
|
|
If entry does not exist it will be created without any checker functions. |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
my $entry = $validator->entry('entry_id'); |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=cut |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub entry |
|
68
|
|
|
|
|
|
|
{ |
|
69
|
0
|
|
|
0
|
1
|
|
my ($self, $vv_id) = @_; |
|
70
|
0
|
0
|
|
|
|
|
$self->{$vv_id} = Validator::Var->new unless defined $self->{$vv_id}; |
|
71
|
0
|
|
|
|
|
|
return $self->{$vv_id}; |
|
72
|
|
|
|
|
|
|
} |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 AUTHOR |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Fedor Semenov, C<< >> |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 BUGS |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
|
82
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
|
83
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 SUPPORT |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
perldoc Validator::Group |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
You can also look for information at: |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=over 4 |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
L |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
L |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item * CPAN Ratings |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
L |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item * Search CPAN |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
L |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=back |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Copyright 2011 Fedor Semenov. |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
|
123
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
|
124
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=cut |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
1; # End of Validator::Group |