| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Alien::7zip; |
|
2
|
|
|
|
|
|
|
$Alien::7zip::VERSION = '0.03'; |
|
3
|
1
|
|
|
1
|
|
281299
|
use strict; |
|
|
1
|
|
|
|
|
8
|
|
|
|
1
|
|
|
|
|
62
|
|
|
4
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
27
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use base qw( Alien::Base ); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
543
|
|
|
6
|
1
|
|
|
1
|
|
5051
|
use 5.008004; |
|
|
1
|
|
|
|
|
3
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Alien::7zip - Find or build 7-Zip |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Command line tool: |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
use Alien::7zip; |
|
17
|
|
|
|
|
|
|
use Env qw( @PATH ); |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
unshift @PATH, Alien::7zip->bin_dir; |
|
20
|
|
|
|
|
|
|
system "@{[ Alien::7zip->exe ]}"; |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
This distribution provides 7-Zip so that it can be used by other |
|
25
|
|
|
|
|
|
|
Perl distributions that are on CPAN. It does this by first trying to |
|
26
|
|
|
|
|
|
|
detect an existing install of 7-Zip on your system. If found it |
|
27
|
|
|
|
|
|
|
will use that. If it cannot be found, the source code will be downloaded |
|
28
|
|
|
|
|
|
|
from the internet and it will be installed in a private share location |
|
29
|
|
|
|
|
|
|
for the use of other modules. |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 METHODS |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head2 exe |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Alien::7zip->exe |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Returns the command name for running 7-Zip. |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub exe { |
|
42
|
1
|
|
|
1
|
1
|
409
|
my($class) = @_; |
|
43
|
1
|
|
|
|
|
6
|
$class->runtime_prop->{command}; |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 HELPERS |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head2 sevenzip |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
%{sevenzip} |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Returns '7z', '7zz', or appropriate command for |
|
53
|
|
|
|
|
|
|
platform. |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=cut |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub alien_helper { |
|
58
|
|
|
|
|
|
|
return +{ |
|
59
|
|
|
|
|
|
|
'sevenzip' => sub { |
|
60
|
0
|
|
|
0
|
|
0
|
Alien::7zip->exe; |
|
61
|
|
|
|
|
|
|
}, |
|
62
|
1
|
|
|
1
|
1
|
35690
|
}; |
|
63
|
|
|
|
|
|
|
} |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=over 4 |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item L<7-Zip|https://www.7-zip.org/> |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
The 7-Zip home page. |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=item L |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Documentation on the Alien concept itself. |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=item L |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
The base class for this Alien. |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=item L |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Detailed manual for users of Alien classes. |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=back |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=cut |