File Coverage

blib/lib/HTML/FormHandler/Field/Year.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package HTML::FormHandler::Field::Year;
2             # ABSTRACT: year selection list
3             $HTML::FormHandler::Field::Year::VERSION = '0.40067';
4 2     2   1790 use Moose;
  2         4  
  2         14  
5             extends 'HTML::FormHandler::Field::IntRange';
6              
7             has '+range_start' => (
8             default => sub {
9             my $year = (localtime)[5] + 1900 - 5;
10             return $year;
11             }
12             );
13             has '+range_end' => (
14             default => sub {
15             my $year = (localtime)[5] + 1900 + 10;
16             return $year;
17             }
18             );
19              
20              
21             __PACKAGE__->meta->make_immutable;
22 2     2   9835 use namespace::autoclean;
  2         3  
  2         22  
23             1;
24              
25             __END__
26              
27             =pod
28              
29             =encoding UTF-8
30              
31             =head1 NAME
32              
33             HTML::FormHandler::Field::Year - year selection list
34              
35             =head1 VERSION
36              
37             version 0.40067
38              
39             =head1 DESCRIPTION
40              
41             Provides a list of years starting five years back and extending 10 years into
42             the future.
43              
44             =head1 AUTHOR
45              
46             FormHandler Contributors - see HTML::FormHandler
47              
48             =head1 COPYRIGHT AND LICENSE
49              
50             This software is copyright (c) 2016 by Gerda Shank.
51              
52             This is free software; you can redistribute it and/or modify it under
53             the same terms as the Perl 5 programming language system itself.
54              
55             =cut