line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormFu::Constraint::MaxRange; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
712
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
83
|
|
4
|
|
|
|
|
|
|
our $VERSION = '2.05'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
7
|
use Moose; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
12
|
|
7
|
|
|
|
|
|
|
extends 'HTML::FormFu::Constraint::Range'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub _localize_args { |
10
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
|
return $self->max; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
1; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
__END__ |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 NAME |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
HTML::FormFu::Constraint::MaxRange - Maximum Value Constraint |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 VERSION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
version 2.05 |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 DESCRIPTION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Checks the input value is equal to or less than a maximum value. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Overrides L<HTML::FormFu::Constraint/localize_args>, so that the value of |
34
|
|
|
|
|
|
|
L</maximum> is passed as an argument to L<localize|HTML::FormFu/localize>. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
This constraint doesn't honour the C<not()> value. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 METHODS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head2 maximum |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head2 max |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
The maximum input value. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
L</max> is an alias for L</maximum>. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 SEE ALSO |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Is a sub-class of, and inherits methods from |
51
|
|
|
|
|
|
|
L<HTML::FormFu::Constraint::Range>, L<HTML::FormFu::Constraint> |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
L<HTML::FormFu> |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 AUTHOR |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Carl Franks C<cfranks@cpan.org> |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 LICENSE |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
62
|
|
|
|
|
|
|
the same terms as Perl itself. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |