line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Install::TrustMetaYml; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
25950
|
use 5.005; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
48
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
44
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
BEGIN { |
7
|
1
|
|
|
1
|
|
2
|
$Module::Install::TrustMetaYml::AUTHORITY = 'cpan:TOBYINK'; |
8
|
1
|
|
|
|
|
27
|
$Module::Install::TrustMetaYml::VERSION = '0.003'; |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
5
|
use base qw(Module::Install::Base); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
538
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub trust_meta_yml |
14
|
|
|
|
|
|
|
{ |
15
|
0
|
|
|
0
|
1
|
|
my ($self, $where) = @_; |
16
|
0
|
|
0
|
|
|
|
$where ||= 'META.yml'; |
17
|
|
|
|
|
|
|
|
18
|
0
|
0
|
|
|
|
|
$self->perl_version('5.005') unless defined $self->perl_version; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
$self->include('YAML::Tiny', 0); |
21
|
0
|
0
|
|
|
|
|
return $self if $self->is_admin; |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
require YAML::Tiny; |
24
|
0
|
|
|
|
|
|
my $data = YAML::Tiny::LoadFile($where); |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
0
|
|
|
|
$self->perl_version($data->{requires}{perl} || '5.005'); |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
KEY: foreach my $key (qw(requires recommends build_requires)) |
29
|
|
|
|
|
|
|
{ |
30
|
0
|
0
|
|
|
|
|
next KEY unless ref $data->{$key} eq 'HASH'; |
31
|
0
|
|
|
|
|
|
my %deps = %{$data->{$key}}; |
|
0
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
DEP: while (my ($pkg, $ver) = each %deps) |
33
|
|
|
|
|
|
|
{ |
34
|
0
|
0
|
|
|
|
|
next if $pkg eq 'perl'; |
35
|
0
|
|
|
|
|
|
$self->$key($pkg, $ver); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
return $self; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
*trust_meta_yaml = \&trust_meta_yml; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |