line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSAN::Index::Release::Dependency; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
35
|
use strict; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
220
|
|
4
|
6
|
|
|
6
|
|
35
|
use Params::Util '_INSTANCE'; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
394
|
|
5
|
6
|
|
|
6
|
|
6028
|
use Algorithm::Dependency::Ordered; |
|
6
|
|
|
|
|
24657
|
|
|
6
|
|
|
|
|
275
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
48
|
use vars qw{$VERSION @ISA}; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
366
|
|
8
|
|
|
|
|
|
|
BEGIN { |
9
|
6
|
|
|
6
|
|
13
|
$VERSION = '0.28'; |
10
|
6
|
|
|
|
|
2571
|
@ISA = 'Algorithm::Dependency::Ordered'; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
4
|
50
|
|
4
|
1
|
21
|
my $class = ref $_[0] ? ref shift : shift; |
15
|
4
|
|
|
|
|
23
|
my %params = @_; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Apply defaults |
18
|
4
|
|
33
|
|
|
83
|
$params{source} ||= JSAN::Index::Release::Source->new( %params ); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Hand off to superclass constructor |
21
|
4
|
50
|
|
|
|
58
|
my $self = $class->SUPER::new( %params ) |
22
|
|
|
|
|
|
|
or Carp::croak("Failed to create JSAN::Index::Release::Dependency object"); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# Save the type for later |
25
|
4
|
|
|
|
|
185
|
$self->{build} = !! $params{build}; |
26
|
|
|
|
|
|
|
|
27
|
4
|
|
|
|
|
20
|
$self; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
0
|
0
|
sub build { $_[0]->{build} } |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub schedule { |
33
|
4
|
|
|
4
|
1
|
1034
|
my $self = shift; |
34
|
4
|
|
|
|
|
13
|
my @schedule = @_; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# Convert things in the schedule from index objects to |
37
|
|
|
|
|
|
|
# release source strings as needed |
38
|
4
|
|
|
|
|
12
|
my @cleaned = (); |
39
|
4
|
|
|
|
|
14
|
foreach my $item ( @schedule ) { |
40
|
4
|
100
|
66
|
|
|
50
|
if ( defined $item and ! ref $item and $item =~ /^(?:\w+)(?:\.\w+)*$/ ) { |
|
|
|
66
|
|
|
|
|
41
|
1
|
|
|
|
|
10
|
$item = JSAN::Index::Library->retrieve( name => $item ); |
42
|
|
|
|
|
|
|
} |
43
|
4
|
100
|
|
|
|
68
|
if ( _INSTANCE($item, 'JSAN::Index::Library') ) { |
44
|
1
|
|
|
|
|
5
|
$item = $item->release; |
45
|
|
|
|
|
|
|
} |
46
|
4
|
50
|
|
|
|
51
|
if ( _INSTANCE($item, 'JSAN::Index::Release') ) { |
47
|
4
|
|
|
|
|
22
|
$item = $item->source; |
48
|
|
|
|
|
|
|
} |
49
|
4
|
|
|
|
|
20
|
push @cleaned, $item; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
4
|
|
|
|
|
41
|
$self->SUPER::schedule(@cleaned); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |