line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::Dist::Asset::Perl; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Perl::Dist asset for the Perl source code itself |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
4304
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
91
|
|
6
|
1
|
|
|
1
|
|
6
|
use Carp (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
15
|
|
7
|
1
|
|
|
1
|
|
7
|
use Params::Util (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
13
|
|
8
|
1
|
|
|
1
|
|
7
|
use Perl::Dist::Asset (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
6
|
use vars qw{$VERSION @ISA}; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
120
|
|
11
|
|
|
|
|
|
|
BEGIN { |
12
|
1
|
|
|
1
|
|
4
|
$VERSION = '1.16'; |
13
|
1
|
|
|
|
|
42
|
@ISA = 'Perl::Dist::Asset'; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
|
|
10
|
use Object::Tiny qw{ |
17
|
|
|
|
|
|
|
name |
18
|
|
|
|
|
|
|
force |
19
|
|
|
|
|
|
|
license |
20
|
|
|
|
|
|
|
unpack_to |
21
|
|
|
|
|
|
|
install_to |
22
|
|
|
|
|
|
|
patch |
23
|
1
|
|
|
1
|
|
6
|
}; |
|
1
|
|
|
|
|
2
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
##################################################################### |
30
|
|
|
|
|
|
|
# Constructor |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub new { |
33
|
0
|
|
|
0
|
0
|
|
my $self = shift->SUPER::new(@_); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# Apply defaults |
36
|
0
|
0
|
|
|
|
|
$self->{unpack_to} = '' unless defined $self->unpack_to; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# Check params |
39
|
0
|
0
|
|
|
|
|
unless ( Params::Util::_STRING($self->name) ) { |
40
|
0
|
|
|
|
|
|
Carp::croak("Missing or invalid name param"); |
41
|
|
|
|
|
|
|
} |
42
|
0
|
0
|
|
|
|
|
unless ( Params::Util::_HASH($self->license) ) { |
43
|
0
|
|
|
|
|
|
Carp::croak("Missing or invalid license param"); |
44
|
|
|
|
|
|
|
} |
45
|
0
|
0
|
0
|
|
|
|
unless ( defined $self->unpack_to and ! ref $self->unpack_to ) { |
46
|
0
|
|
|
|
|
|
Carp::croak("Missing or invalid unpack_to param"); |
47
|
|
|
|
|
|
|
} |
48
|
0
|
0
|
|
|
|
|
unless ( Params::Util::_STRING($self->install_to) ) { |
49
|
0
|
|
|
|
|
|
Carp::croak("Missing or invalid install_to param"); |
50
|
|
|
|
|
|
|
} |
51
|
0
|
0
|
0
|
|
|
|
if ( $self->patch and ! Params::Util::_ARRAY($self->patch) ) { |
52
|
0
|
|
|
|
|
|
Carp::croak("Invalid patch param"); |
53
|
|
|
|
|
|
|
} |
54
|
0
|
|
|
|
|
|
$self->{force} = !! $self->force; |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
|
return $self; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |