« blib/lib/Alien/Build/Plugin.pm
↑ Summary
blib/lib/Alien/Build/Plugin/Decode/DirListingFtpcopy.pm »
| 1 | package Alien::Build::Plugin::Extract::ArchiveZip; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 7 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 7 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 7 | ▶ | use 5.008004; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | 7 | ▶ | use Alien::Build::Plugin; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | # ABSTRACT: Plugin to extract a tarball using Archive::Zip | ||||||||||||||||||||
| 9 | 7 | our $VERSION = '2.88'; # VERSION | |||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | 7 | has '+format' => 'zip'; | |||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | sub handles | ||||||||||||||||||||
| 16 | 0 | ▶ | { | ||||||||||||||||||
|
Subroutine
handles: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 17 | 0 | my($class, $ext) = @_; | |||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | 0 | ▶ | return 1 if $ext eq 'zip'; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | 0 | return 0; | |||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | sub available | ||||||||||||||||||||
| 26 | 3 | ▶ | { | ||||||||||||||||||
|
Subroutine
available: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 27 | 3 | my(undef, $ext) = @_; | |||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 3 | ▶ | !! ( $ext eq 'zip' && eval { require Archive::Zip; 1} ); | ||||||||||||||||||
|
Condition100%3/3
$ext eq 'zip' && eval {
do {
require Archive::Zip;
1
}
}
MC/DC100%2/2
$ext eq 'zip' && eval {
do {
require Archive::Zip;
1
}
}
$ext eq 'zip'
eval {
do {
require Archive::Zip;
1
}
}
Truth table100%3/3
A && B
A= $ext eq 'zip'B= eval {
do {
require Archive::Zip;
1
}
}
| |||||||||||||||||||||
| 30 | } | ||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | sub init | ||||||||||||||||||||
| 33 | 1 | ▶ | { | ||||||||||||||||||
|
Subroutine
init: called CC=1 SCAR=1.7
Pod
documented
| |||||||||||||||||||||
| 34 | 1 | my($self, $meta) = @_; | |||||||||||||||||||
| 35 | |||||||||||||||||||||
| 36 | 1 | $meta->add_requires('share' => 'Archive::Zip' => 0); | |||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | $meta->register_hook( | ||||||||||||||||||||
| 39 | 0 | ▶ | extract => sub { | ||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 40 | 0 | my($build, $src) = @_; | |||||||||||||||||||
| 41 | 0 | my $zip = Archive::Zip->new; | |||||||||||||||||||
| 42 | 0 | $zip->read($src); | |||||||||||||||||||
| 43 | 0 | $zip->extractTree; | |||||||||||||||||||
| 44 | } | ||||||||||||||||||||
| 45 | 1 | ); | |||||||||||||||||||
| 46 | } | ||||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | 7 | 1; | |||||||||||||||||||
| 49 | |||||||||||||||||||||
| 50 | __END__ | ||||||||||||||||||||