blib/lib/Alien/7zip.pm

filter: Statementstmt 94.1% 16 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 100% 2 / 2 totaltotal 92.3% 24 / 26 CC 1 SCAR 1.5
CC
1
Cov
94%
__ANON__
2.0
alien_helper
1.1
BEGIN
1.0
CRAP 1.2
« alienfile ↑ Summary
1 package Alien::7zip;
2 1 $Alien::7zip::VERSION = '0.03';
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use base qw( Alien::Base );
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use 5.008004;
Subroutine BEGIN: called CC=1 SCAR=0.0
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 1 ▶sub exe {
Subroutine exe: called CC=1 SCAR=0.0
Pod documented
42 1 my($class) = @_;
43 1 $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 1 ▶sub alien_helper {
Subroutine alien_helper: called CC=1 SCAR=1.2
Pod documented
58 return +{
59 0 ▶ 'sevenzip' => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
60 0 Alien::7zip->exe;
61 },
62 1 };
63 }
64  
65 1 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<Alien>
76  
77 Documentation on the Alien concept itself.
78  
79 =item L<Alien::Base>
80  
81 The base class for this Alien.
82  
83 =item L<Alien::Build::Manual::AlienUser>
84  
85 Detailed manual for users of Alien classes.
86  
87 =back
88  
89 =cut
« alienfile ↑ Summary