Debian Codegraph @

lib/HTML/FormHandler/Field/Year.pm

raw
1 package HTML::FormHandler::Field::Year;
2 # ABSTRACT: year selection list
3 $HTML::FormHandler::Field::Year::VERSION = '0.410002';
4 use Moose;
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 use namespace::autoclean;
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.410002
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) 2017 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