line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Alien::Base::ModuleBuild::Cabinet; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
452
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
58
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
54
|
|
5
|
2
|
|
|
2
|
|
495
|
use Sort::Versions qw( versioncmp ); |
|
2
|
|
|
|
|
740
|
|
|
2
|
|
|
|
|
544
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: Private class |
8
|
|
|
|
|
|
|
our $VERSION = '1.15'; # VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
5
|
|
|
5
|
0
|
9712
|
my $class = shift; |
12
|
5
|
50
|
|
|
|
47
|
my $self = ref $_[0] ? shift : { @_ }; |
13
|
|
|
|
|
|
|
|
14
|
5
|
|
|
|
|
27
|
bless $self, $class; |
15
|
|
|
|
|
|
|
|
16
|
5
|
|
|
|
|
28
|
return $self; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
10
|
|
|
10
|
0
|
68
|
sub files { shift->{files} } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub add_files { |
22
|
5
|
|
|
5
|
0
|
673
|
my $self = shift; |
23
|
5
|
|
|
|
|
10
|
push @{ $self->{files} }, @_; |
|
5
|
|
|
|
|
48
|
|
24
|
5
|
|
|
|
|
24
|
return $self->files; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub sort_files { |
28
|
4
|
|
|
4
|
0
|
18
|
my $self = shift; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
$self->{files} = [ |
31
|
7
|
100
|
|
|
|
151
|
sort { $b->has_version <=> $a->has_version || ($a->has_version ? versioncmp($b->version, $a->version) : versioncmp($b->filename, $a->filename)) } |
|
|
50
|
|
|
|
|
|
32
|
4
|
|
|
|
|
10
|
@{ $self->{files} } |
|
4
|
|
|
|
|
22
|
|
33
|
|
|
|
|
|
|
]; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
## split files which have versions and those which don't (sorted on filename) |
36
|
|
|
|
|
|
|
#my ($name, $version) = part { $_->has_version } @{ $self->{files} }; |
37
|
|
|
|
|
|
|
# |
38
|
|
|
|
|
|
|
## store the sorted lists of versioned, then non-versioned |
39
|
|
|
|
|
|
|
#my @sorted; |
40
|
|
|
|
|
|
|
#push @sorted, sort { versioncmp( $b->version, $a->version ) } @$version if $version; |
41
|
|
|
|
|
|
|
#push @sorted, sort { versioncmp( $b->filename, $a->filename ) } @$name if $name; |
42
|
|
|
|
|
|
|
# |
43
|
|
|
|
|
|
|
#$self->{files} = \@sorted; |
44
|
|
|
|
|
|
|
|
45
|
4
|
|
|
|
|
46
|
return; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__END__ |