line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Tag::YEAR; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use Class::AutoAccess; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
7
|
1
|
|
|
1
|
|
6
|
use Tie::IxHash; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
8
|
1
|
|
|
1
|
|
5
|
use base qw(Class::AutoAccess HTML::Tag::SELECT); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
628
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '1.01'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
BEGIN { |
13
|
1
|
|
|
1
|
|
261
|
our $class_def = { |
14
|
|
|
|
|
|
|
element => 'YEAR', |
15
|
|
|
|
|
|
|
tag => 'SELECT', |
16
|
|
|
|
|
|
|
from => (localtime())[5] + 1800, |
17
|
|
|
|
|
|
|
to => (localtime())[5] + 2000, |
18
|
|
|
|
|
|
|
selected => (localtime())[5] + 1900, |
19
|
|
|
|
|
|
|
maybenull => 0, |
20
|
|
|
|
|
|
|
permitted => undef, |
21
|
|
|
|
|
|
|
value => '', |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub inner { |
26
|
4
|
|
|
4
|
0
|
5
|
my $self = shift; |
27
|
4
|
|
|
|
|
5
|
my $ret = ''; |
28
|
4
|
100
|
|
|
|
24
|
$ret .= qq|\n| if ($self->maybenull); |
29
|
4
|
|
|
|
|
135
|
my $year = (localtime())[5]+1900; |
30
|
4
|
100
|
|
|
|
19
|
my @permitted = $self->permitted ? sort @{$self->permitted} : ($self->from..$self->to); |
|
1
|
|
|
|
|
7
|
|
31
|
4
|
|
|
|
|
148
|
foreach (@permitted) { |
32
|
306
|
|
|
|
|
1702
|
$_ = sprintf('%04d',$_); |
33
|
306
|
100
|
|
|
|
680
|
$ret .= qq| |
34
|
|
|
|
|
|
|
qq|>$_\n|; |
35
|
|
|
|
|
|
|
} |
36
|
4
|
|
|
|
|
69
|
return $ret; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# vim: set ts=2: |