line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#line 1 |
2
|
|
|
|
|
|
|
package Modern::Perl; |
3
|
|
|
|
|
|
|
{ |
4
|
|
|
|
|
|
|
$Modern::Perl::VERSION = '1.20121103'; |
5
|
|
|
|
|
|
|
} |
6
|
|
|
|
|
|
|
# ABSTRACT: enable all of the features of Modern Perl with one import |
7
|
2
|
|
|
2
|
|
1193
|
|
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
64
|
|
8
|
|
|
|
|
|
|
use 5.010_000; |
9
|
2
|
|
|
2
|
|
9
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
55
|
|
10
|
2
|
|
|
2
|
|
9
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
60
|
|
11
|
|
|
|
|
|
|
use warnings; |
12
|
2
|
|
|
2
|
|
1906
|
|
|
2
|
|
|
|
|
1687
|
|
|
2
|
|
|
|
|
48
|
|
13
|
2
|
|
|
2
|
|
13
|
use mro (); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
31
|
|
14
|
|
|
|
|
|
|
use feature (); |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
2
|
|
2148
|
# enable methods on filehandles; unnecessary when 5.14 autoloads them |
|
2
|
|
|
|
|
29451
|
|
|
2
|
|
|
|
|
51
|
|
17
|
2
|
|
|
2
|
|
17
|
use IO::File (); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
718
|
|
18
|
|
|
|
|
|
|
use IO::Handle (); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my $wanted_date; |
23
|
|
|
|
|
|
|
sub VERSION |
24
|
0
|
|
|
0
|
0
|
0
|
{ |
25
|
|
|
|
|
|
|
my ($self, $version) = @_; |
26
|
0
|
0
|
|
|
|
0
|
|
27
|
0
|
0
|
|
|
|
0
|
return $VERSION unless defined $version; |
28
|
|
|
|
|
|
|
return $VERSION if $version < 2009; |
29
|
0
|
0
|
|
|
|
0
|
|
30
|
0
|
|
|
|
|
0
|
$wanted_date = $version if (caller(1))[3] =~ /::BEGIN/; |
31
|
|
|
|
|
|
|
return 2012; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub import |
35
|
2
|
|
|
2
|
|
37
|
{ |
36
|
2
|
50
|
|
|
|
11
|
my ($class, $date) = @_; |
37
|
|
|
|
|
|
|
$date = $wanted_date unless defined $date; |
38
|
2
|
|
|
|
|
6
|
|
39
|
2
|
|
|
|
|
5
|
my $feature_tag = validate_date( $date ); |
40
|
|
|
|
|
|
|
undef $wanted_date; |
41
|
2
|
|
|
|
|
33
|
|
42
|
2
|
|
|
|
|
28
|
warnings->import(); |
43
|
2
|
|
|
|
|
233
|
strict->import(); |
44
|
2
|
|
|
|
|
52
|
feature->import( $feature_tag ); |
45
|
|
|
|
|
|
|
mro::set_mro( scalar caller(), 'c3' ); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub unimport |
49
|
0
|
|
|
0
|
|
0
|
{ |
50
|
0
|
|
|
|
|
0
|
warnings->unimport; |
51
|
0
|
|
|
|
|
0
|
strict->unimport; |
52
|
|
|
|
|
|
|
feature->unimport; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
my %dates = |
56
|
|
|
|
|
|
|
( |
57
|
|
|
|
|
|
|
2009 => ':5.10', |
58
|
|
|
|
|
|
|
2010 => ':5.10', |
59
|
|
|
|
|
|
|
2011 => ':5.12', |
60
|
|
|
|
|
|
|
2012 => ':5.14', |
61
|
|
|
|
|
|
|
2013 => ':5.16', |
62
|
|
|
|
|
|
|
); |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub validate_date |
65
|
2
|
|
|
2
|
0
|
3
|
{ |
66
|
|
|
|
|
|
|
my $date = shift; |
67
|
|
|
|
|
|
|
|
68
|
2
|
50
|
|
|
|
6
|
# always enable unicode_strings when available |
69
|
|
|
|
|
|
|
unless ($date) |
70
|
2
|
50
|
|
|
|
13
|
{ |
71
|
0
|
|
|
|
|
|
return ':5.12' if $] > 5.011003; |
72
|
|
|
|
|
|
|
return ':5.10'; |
73
|
|
|
|
|
|
|
} |
74
|
0
|
|
|
|
|
|
|
75
|
0
|
0
|
|
|
|
|
my $year = substr $date, 0, 4; |
76
|
|
|
|
|
|
|
return $dates{$year} if exists $dates{$year}; |
77
|
0
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
die "Unknown date '$date' requested\n"; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
1; |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
__END__ |