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