line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormFu::Constraint::SingleValue; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
656
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
92
|
|
4
|
|
|
|
|
|
|
our $VERSION = '2.05'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
7
|
use Moose; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
14
|
|
7
|
|
|
|
|
|
|
extends 'HTML::FormFu::Constraint'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub constrain_values { |
10
|
1
|
|
|
1
|
0
|
2
|
my ( $self, $values ) = @_; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
|
|
14
|
die; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub constrain_value { |
16
|
4
|
|
|
4
|
0
|
7
|
return 1; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__END__ |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
HTML::FormFu::Constraint::SingleValue - Single Value Constraint |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 VERSION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
version 2.05 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 DESCRIPTION |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Ensures that multiple values were not submitted for the named element. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
This constraint doesn't honour the C<not()> value. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 SEE ALSO |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Is a sub-class of, and inherits methods from L<HTML::FormFu::Constraint> |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
L<HTML::FormFu> |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 AUTHOR |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Carl Franks C<cfranks@cpan.org> |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 LICENSE |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
52
|
|
|
|
|
|
|
the same terms as Perl itself. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=cut |