File Coverage

blib/lib/HTML/FormFu/Constraint/File/MinSize.pm
Criterion Covered Total %
statement 8 8 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 11 11 100.0


line stmt bran cond sub pod time code
1             package HTML::FormFu::Constraint::File::MinSize;
2              
3 2     2   507 use strict;
  2         4  
  2         94  
4             our $VERSION = '2.05'; # VERSION
5              
6 2     2   11 use Moose;
  2         4  
  2         13  
7             extends 'HTML::FormFu::Constraint::File::Size';
8              
9             sub _localize_args {
10 1     1   1 my ($self) = @_;
11              
12 1         6 return $self->min;
13             }
14              
15             __PACKAGE__->meta->make_immutable;
16              
17             1;
18              
19             __END__
20              
21             =head1 NAME
22              
23             HTML::FormFu::Constraint::File::MinSize - Minimum File Size Constraint
24              
25             =head1 VERSION
26              
27             version 2.05
28              
29             =head1 DESCRIPTION
30              
31             Ensure that an uploaded file meets minimum size constraints.
32              
33             Overrides L<HTML::FormFu::Constraint/localize_args>, so that the value of
34             L</minimum> 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 minimum
41              
42             =head2 min
43              
44             The minimum file size in bytes.
45              
46             L</min> is an alias for L</minimum>.
47              
48             =head1 SEE ALSO
49              
50             Is a sub-class of, and inherits methods from L<HTML::FormFu::File::Size>,
51             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