← Index
NYTProf Performance Profile   « line view »
For /Users/brian/bin/perls/cpan5.26.1
  Run on Sat Dec 30 01:41:10 2017
Reported on Sat Dec 30 01:44:15 2017

Filename/usr/local/perls/perl-5.26.1/lib/5.26.1/CPAN/Tarzip.pm
StatementsExecuted 1365 statements in 64.4ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11162.1ms62.1msCPAN::Tarzip::::CORE:systemCPAN::Tarzip::CORE:system (opcode)
3322.15ms243msCPAN::Tarzip::::gtestCPAN::Tarzip::gtest
111337µs121msCPAN::Tarzip::::untarCPAN::Tarzip::untar
222115µs169µsCPAN::Tarzip::::newCPAN::Tarzip::new
137184µs84µsCPAN::Tarzip::::CORE:matchCPAN::Tarzip::CORE:match (opcode)
11167µs154msCPAN::Tarzip::::TIEHANDLECPAN::Tarzip::TIEHANDLE
21158µs58µsCPAN::Tarzip::::CORE:ftsizeCPAN::Tarzip::CORE:ftsize (opcode)
22133µs145µsCPAN::Tarzip::::DESTROYCPAN::Tarzip::DESTROY
42123µs23µsCPAN::Tarzip::::_my_whichCPAN::Tarzip::_my_which
0000s0sCPAN::Tarzip::::BEGINCPAN::Tarzip::BEGIN
0000s0sCPAN::Tarzip::::READCPAN::Tarzip::READ
0000s0sCPAN::Tarzip::::READLINECPAN::Tarzip::READLINE
0000s0sCPAN::Tarzip::::gunzipCPAN::Tarzip::gunzip
0000s0sCPAN::Tarzip::::gzipCPAN::Tarzip::gzip
0000s0sCPAN::Tarzip::::unzipCPAN::Tarzip::unzip
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*-
2package CPAN::Tarzip;
3use strict;
4use vars qw($VERSION @ISA $BUGHUNTING);
5use CPAN::Debug;
6use File::Basename qw(basename);
7$VERSION = "5.5012";
8# module is internal to CPAN.pm
9
10@ISA = qw(CPAN::Debug); ## no critic
11$BUGHUNTING ||= 0; # released code must have turned off
12
13# it's ok if file doesn't exist, it just matters if it is .gz or .bz2
14
# spent 169µs (115+54) within CPAN::Tarzip::new which was called 2 times, avg 84µs/call: # once (78µs+35µs) by CPAN::Distribution::run_preps_on_packagedir at line 495 of CPAN/Distribution.pm # once (37µs+19µs) by CPAN::Tarzip::TIEHANDLE at line 173
sub new {
1522µs my($class,$file) = @_;
1622µs $CPAN::Frontend->mydie("CPAN::Tarzip->new called without arg") unless defined $file;
1727µs my $me = { FILE => $file };
18258µs223µs if ($file =~ /\.(bz2|gz|zip|tbz|tgz)$/i) {
# spent 23µs making 2 calls to CPAN::Tarzip::CORE:match, avg 12µs/call
19 $me->{ISCOMPRESSED} = 1;
20 } else {
21 $me->{ISCOMPRESSED} = 0;
22 }
23216µs28µs if (0) {
# spent 8µs making 2 calls to CPAN::Tarzip::CORE:match, avg 4µs/call
24 } elsif ($file =~ /\.(?:bz2|tbz)$/i) {
25 unless ($me->{UNGZIPPRG} = $CPAN::Config->{bzip2}) {
26 my $bzip2 = _my_which("bzip2");
27 if ($bzip2) {
28 $me->{UNGZIPPRG} = $bzip2;
29 } else {
30 $CPAN::Frontend->mydie(qq{
31CPAN.pm needs the external program bzip2 in order to handle '$file'.
32Please install it now and run 'o conf init bzip2' from the
33CPAN shell prompt to register it as external program.
34});
35 }
36 }
37 } else {
38210µs215µs $me->{UNGZIPPRG} = _my_which("gzip");
# spent 15µs making 2 calls to CPAN::Tarzip::_my_which, avg 8µs/call
39 }
4025µs28µs $me->{TARPRG} = _my_which("tar") || _my_which("gtar");
# spent 8µs making 2 calls to CPAN::Tarzip::_my_which, avg 4µs/call
41220µs bless $me, $class;
42}
43
44
# spent 23µs within CPAN::Tarzip::_my_which which was called 4 times, avg 6µs/call: # 2 times (15µs+0s) by CPAN::Tarzip::new at line 38, avg 8µs/call # 2 times (8µs+0s) by CPAN::Tarzip::new at line 40, avg 4µs/call
sub _my_which {
4542µs my($what) = @_;
46445µs if ($CPAN::Config->{$what}) {
47 return $CPAN::Config->{$what};
48 }
49 if ($CPAN::META->has_inst("File::Which")) {
50 return File::Which::which($what);
51 }
52 my @cand = MM->maybe_command($what);
53 return $cand[0] if @cand;
54 require File::Spec;
55 my $component;
56 PATH_COMPONENT: foreach $component (File::Spec->path()) {
57 next unless defined($component) && $component;
58 my($abs) = File::Spec->catfile($component,$what);
59 if (MM->maybe_command($abs)) {
60 return $abs;
61 }
62 }
63 return;
64}
65
66sub gzip {
67 my($self,$read) = @_;
68 my $write = $self->{FILE};
69 if ($CPAN::META->has_inst("Compress::Zlib")) {
70 my($buffer,$fhw);
71 $fhw = FileHandle->new($read)
72 or $CPAN::Frontend->mydie("Could not open $read: $!");
73 my $cwd = `pwd`;
74 my $gz = Compress::Zlib::gzopen($write, "wb")
75 or $CPAN::Frontend->mydie("Cannot gzopen $write: $! (pwd is $cwd)\n");
76 binmode($fhw);
77 $gz->gzwrite($buffer)
78 while read($fhw,$buffer,4096) > 0 ;
79 $gz->gzclose() ;
80 $fhw->close;
81 return 1;
82 } else {
83 my $command = CPAN::HandleConfig->safe_quote($self->{UNGZIPPRG});
84 system(qq{$command -c "$read" > "$write"})==0;
85 }
86}
87
88
89sub gunzip {
90 my($self,$write) = @_;
91 my $read = $self->{FILE};
92 if ($CPAN::META->has_inst("Compress::Zlib")) {
93 my($buffer,$fhw);
94 $fhw = FileHandle->new(">$write")
95 or $CPAN::Frontend->mydie("Could not open >$write: $!");
96 my $gz = Compress::Zlib::gzopen($read, "rb")
97 or $CPAN::Frontend->mydie("Cannot gzopen $read: $!\n");
98 binmode($fhw);
99 $fhw->print($buffer)
100 while $gz->gzread($buffer) > 0 ;
101 $CPAN::Frontend->mydie("Error reading from $read: $!\n")
102 if $gz->gzerror != Compress::Zlib::Z_STREAM_END();
103 $gz->gzclose() ;
104 $fhw->close;
105 return 1;
106 } else {
107 my $command = CPAN::HandleConfig->safe_quote($self->{UNGZIPPRG});
108 system(qq{$command -d -c "$read" > "$write"})==0;
109 }
110}
111
112
113
# spent 243ms (2.15+241) within CPAN::Tarzip::gtest which was called 3 times, avg 81.1ms/call: # once (1.11ms+151ms) by CPAN::Tarzip::TIEHANDLE at line 174 # once (1.03ms+90.3ms) by CPAN::Distribution::run_preps_on_packagedir at line 502 of CPAN/Distribution.pm # once (6µs+0s) by CPAN::Tarzip::untar at line 323
sub gtest {
11433µs my($self) = @_;
115318µs return $self->{GTEST} if exists $self->{GTEST};
11621µs defined $self->{FILE} or $CPAN::Frontend->mydie("gtest called but no FILE specified");
11722µs my $read = $self->{FILE};
11822µs my $success;
119252µs666.6ms if ($read=~/\.(?:bz2|tbz)$/ && $CPAN::META->has_inst("Compress::Bzip2")) {
# spent 66.5ms making 2 calls to CPAN::has_inst, avg 33.3ms/call # spent 25µs making 4 calls to CPAN::Tarzip::CORE:match, avg 6µs/call
120 my($buffer,$len);
121 $len = 0;
122 my $gz = Compress::Bzip2::bzopen($read, "rb")
123 or $CPAN::Frontend->mydie(sprintf("Cannot gzopen %s: %s\n",
124 $read,
125 $Compress::Bzip2::bzerrno));
126 while ($gz->bzread($buffer) > 0 ) {
127 $len += length($buffer);
128 $buffer = "";
129 }
130 my $err = $gz->bzerror;
131 $success = ! $err || $err == Compress::Bzip2::BZ_STREAM_END();
132 if ($len == -s $read) {
133 $success = 0;
134 CPAN->debug("hit an uncompressed file") if $CPAN::DEBUG;
135 }
136 $gz->gzclose();
137 CPAN->debug("err[$err]success[$success]") if $CPAN::DEBUG;
138 } elsif ( $read=~/\.(?:gz|tgz)$/ && $CPAN::META->has_inst("Compress::Zlib") ) {
139 # After I had reread the documentation in zlib.h, I discovered that
140 # uncompressed files do not lead to an gzerror (anymore?).
14122µs my($buffer,$len);
14221µs $len = 0;
143275µs212.3ms my $gz = Compress::Zlib::gzopen($read, "rb")
# spent 12.3ms making 2 calls to Compress::Zlib::gzopen, avg 6.17ms/call
144 or $CPAN::Frontend->mydie(sprintf("Cannot gzopen %s: %s\n",
145 $read,
146 $Compress::Zlib::gzerrno));
14727µs2318µs while ($gz->gzread($buffer) > 0 ) {
# spent 318µs making 2 calls to Compress::Zlib::gzFile::gzread, avg 159µs/call
148632176µs $len += length($buffer);
1496321.15ms632162ms $buffer = "";
# spent 162ms making 632 calls to Compress::Zlib::gzFile::gzread, avg 256µs/call
150 }
151228µs27µs my $err = $gz->gzerror;
# spent 7µs making 2 calls to Compress::Zlib::gzFile::gzerror, avg 4µs/call
15226µs23µs $success = ! $err || $err == Compress::Zlib::Z_STREAM_END();
# spent 3µs making 2 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114], avg 2µs/call
153268µs258µs if ($len == -s $read) {
# spent 58µs making 2 calls to CPAN::Tarzip::CORE:ftsize, avg 29µs/call
154 $success = 0;
155 CPAN->debug("hit an uncompressed file") if $CPAN::DEBUG;
156 }
15725µs2233µs $gz->gzclose();
# spent 233µs making 2 calls to Compress::Zlib::gzFile::gzclose, avg 116µs/call
1582120µs457µs CPAN->debug("err[$err]success[$success]") if $CPAN::DEBUG;
# spent 41µs making 2 calls to IO::Uncompress::Base::DESTROY, avg 20µs/call # spent 16µs making 2 calls to Compress::Raw::Zlib::inflateStream::DESTROY, avg 8µs/call
159 } elsif (!$self->{ISCOMPRESSED}) {
160 $success = 0;
161 } else {
162 my $command = CPAN::HandleConfig->safe_quote($self->{UNGZIPPRG});
163 $success = 0==system(qq{$command -qdt "$read"});
164 }
165224µs return $self->{GTEST} = $success;
166}
167
168
169
# spent 154ms (67µs+154) within CPAN::Tarzip::TIEHANDLE which was called: # once (67µs+154ms) by CPAN::Distribution::CHECKSUM_check_file at line 1527 of CPAN/Distribution.pm
sub TIEHANDLE {
17011µs my($class,$file) = @_;
17110s my $ret;
172113µs186µs $class->debug("file[$file]");
# spent 86µs making 1 call to CPAN::Debug::debug
17317µs156µs my $self = $class->new($file);
# spent 56µs making 1 call to CPAN::Tarzip::new
174131µs4152ms if (0) {
# spent 152ms making 1 call to CPAN::Tarzip::gtest # spent 28µs making 1 call to CPAN::has_inst # spent 14µs making 2 calls to CPAN::Tarzip::CORE:match, avg 7µs/call
175 } elsif (!$self->gtest) {
176 my $fh = FileHandle->new($file)
177 or $CPAN::Frontend->mydie("Could not open file[$file]: $!");
178 binmode $fh;
179 $self->{FH} = $fh;
180 $class->debug("via uncompressed FH");
181 } elsif ($file =~ /\.(?:bz2|tbz)$/ && $CPAN::META->has_inst("Compress::Bzip2")) {
182 my $gz = Compress::Bzip2::bzopen($file,"rb") or
183 $CPAN::Frontend->mydie("Could not bzopen $file");
184 $self->{GZ} = $gz;
185 $class->debug("via Compress::Bzip2");
186 } elsif ($file =~/\.(?:gz|tgz)$/ && $CPAN::META->has_inst("Compress::Zlib")) {
18712µs11.88ms my $gz = Compress::Zlib::gzopen($file,"rb") or
# spent 1.88ms making 1 call to Compress::Zlib::gzopen
188 $CPAN::Frontend->mydie("Could not gzopen $file");
18912µs $self->{GZ} = $gz;
19017µs181µs $class->debug("via Compress::Zlib");
# spent 81µs making 1 call to CPAN::Debug::debug
191 } else {
192 my $gzip = CPAN::HandleConfig->safe_quote($self->{UNGZIPPRG});
193 my $pipe = "$gzip -d -c $file |";
194 my $fh = FileHandle->new($pipe) or $CPAN::Frontend->mydie("Could not pipe[$pipe]: $!");
195 binmode $fh;
196 $self->{FH} = $fh;
197 $class->debug("via external $gzip");
198 }
19915µs $self;
200}
201
202
203sub READLINE {
204 my($self) = @_;
205 if (exists $self->{GZ}) {
206 my $gz = $self->{GZ};
207 my($line,$bytesread);
208 $bytesread = $gz->gzreadline($line);
209 return undef if $bytesread <= 0;
210 return $line;
211 } else {
212 my $fh = $self->{FH};
213 return scalar <$fh>;
214 }
215}
216
217
218sub READ {
219 my($self,$ref,$length,$offset) = @_;
220 $CPAN::Frontend->mydie("read with offset not implemented") if defined $offset;
221 if (exists $self->{GZ}) {
222 my $gz = $self->{GZ};
223 my $byteread = $gz->gzread($$ref,$length);# 30eaf79e8b446ef52464b5422da328a8
224 return $byteread;
225 } else {
226 my $fh = $self->{FH};
227 return read($fh,$$ref,$length);
228 }
229}
230
231
232
# spent 145µs (33+112) within CPAN::Tarzip::DESTROY which was called 2 times, avg 72µs/call: # once (22µs+112µs) by CPAN::Distribution::CHECKSUM_check_file at line 1508 of CPAN/Distribution.pm # once (11µs+0s) by CPAN::Distribution::run_preps_on_packagedir at line 596 of CPAN/Distribution.pm
sub DESTROY {
23321µs my($self) = @_;
23425µs if (exists $self->{GZ}) {
23511µs my $gz = $self->{GZ};
23614µs1112µs $gz->gzclose() if defined $gz; # hard to say if it is allowed
# spent 112µs making 1 call to Compress::Zlib::gzFile::gzclose
237 # to be undef ever. AK, 2000-09
238 } else {
23911µs my $fh = $self->{FH};
24011µs $fh->close if defined $fh;
241 }
242217µs undef $self;
243}
244
245
# spent 121ms (337µs+120) within CPAN::Tarzip::untar which was called: # once (337µs+120ms) by CPAN::Distribution::untar_me at line 1203 of CPAN/Distribution.pm
sub untar {
24611µs my($self) = @_;
24711µs my $file = $self->{FILE};
24811µs my($prefer) = 0;
249
25010s my $exttar = $self->{TARPRG} || "";
251121µs110µs $exttar = "" if $exttar =~ /^\s+$/; # user refuses to use it
# spent 10µs making 1 call to CPAN::Tarzip::CORE:match
25219µs my $extgzip = $self->{UNGZIPPRG} || "";
253111µs11µs $extgzip = "" if $extgzip =~ /^\s+$/; # user refuses to use it
# spent 1µs making 1 call to CPAN::Tarzip::CORE:match
254
255115µs258.3ms if (0) { # makes changing order easier
# spent 58.2ms making 1 call to CPAN::has_usable # spent 35µs making 1 call to CPAN::has_inst
256 } elsif ($BUGHUNTING) {
257 $prefer=2;
258 } elsif ($CPAN::Config->{prefer_external_tar}) {
259 $prefer = 1;
260 } elsif (
261 $CPAN::META->has_usable("Archive::Tar")
262 &&
263 $CPAN::META->has_inst("Compress::Zlib") ) {
264127µs my $prefer_external_tar = $CPAN::Config->{prefer_external_tar};
26510s unless (defined $prefer_external_tar) {
266113µs13µs if ($^O =~ /(MSWin32|solaris)/) {
# spent 3µs making 1 call to CPAN::Tarzip::CORE:match
267 $prefer_external_tar = 0;
268 } else {
26910s $prefer_external_tar = 1;
270 }
271 }
27211µs $prefer = $prefer_external_tar ? 1 : 2;
273 } elsif ($exttar && $extgzip) {
274 # no modules and not bz2
275 $prefer = 1;
276 # but solaris binary tar is a problem
277 if ($^O eq 'solaris' && qx($exttar --version 2>/dev/null) !~ /gnu/i) {
278 $CPAN::Frontend->mywarn(<< 'END_WARN');
279
280WARNING: Many CPAN distributions were archived with GNU tar and some of
281them may be incompatible with Solaris tar. We respectfully suggest you
282configure CPAN to use a GNU tar instead ("o conf init tar") or install
283a recent Archive::Tar instead;
284
285END_WARN
286 }
287 } else {
288 my $foundtar = $exttar ? "'$exttar'" : "nothing";
289 my $foundzip = $extgzip ? "'$extgzip'" : $foundtar ? "nothing" : "also nothing";
290 my $foundAT;
291 if ($CPAN::META->has_usable("Archive::Tar")) {
292 $foundAT = sprintf "'%s'", "Archive::Tar::"->VERSION;
293 } else {
294 $foundAT = "nothing";
295 }
296 my $foundCZ;
297 if ($CPAN::META->has_inst("Compress::Zlib")) {
298 $foundCZ = sprintf "'%s'", "Compress::Zlib::"->VERSION;
299 } elsif ($foundAT) {
300 $foundCZ = "nothing";
301 } else {
302 $foundCZ = "also nothing";
303 }
304 $CPAN::Frontend->mydie(qq{
305
306CPAN.pm needs either the external programs tar and gzip -or- both
307modules Archive::Tar and Compress::Zlib installed.
308
309For tar I found $foundtar, for gzip $foundzip.
310
311For Archive::Tar I found $foundAT, for Compress::Zlib $foundCZ;
312
313Can't continue cutting file '$file'.
314});
315 }
31615µs my $tar_verb = "v";
317116µs if (defined $CPAN::Config->{tar_verbosity}) {
318 $tar_verb = $CPAN::Config->{tar_verbosity} eq "none" ? "" :
319 $CPAN::Config->{tar_verbosity};
320 }
32110s if ($prefer==1) { # 1 => external gzip+tar
322113µs my($system);
32315µs16µs my $is_compressed = $self->gtest();
# spent 6µs making 1 call to CPAN::Tarzip::gtest
324124µs144µs my $tarcommand = CPAN::HandleConfig->safe_quote($exttar);
# spent 44µs making 1 call to CPAN::HandleConfig::safe_quote
325111µs if ($is_compressed) {
32614µs19µs my $command = CPAN::HandleConfig->safe_quote($extgzip);
# spent 9µs making 1 call to CPAN::HandleConfig::safe_quote
32715µs $system = qq{$command -d -c }.
328 qq{< "$file" | $tarcommand x${tar_verb}f -};
329 } else {
330 $system = qq{$tarcommand x${tar_verb}f "$file"};
331 }
332162.2ms162.1ms if (system($system) != 0) {
# spent 62.1ms making 1 call to CPAN::Tarzip::CORE:system
333 # people find the most curious tar binaries that cannot handle
334 # pipes
335 if ($is_compressed) {
336 (my $ungzf = $file) =~ s/\.gz(?!\n)\Z//;
337 $ungzf = basename $ungzf;
338 my $ct = CPAN::Tarzip->new($file);
339 if ($ct->gunzip($ungzf)) {
340 $CPAN::Frontend->myprint(qq{Uncompressed $file successfully\n});
341 } else {
342 $CPAN::Frontend->mydie(qq{Couldn\'t uncompress $file\n});
343 }
344 $file = $ungzf;
345 }
346 $system = qq{$tarcommand x${tar_verb}f "$file"};
347 $CPAN::Frontend->myprint(qq{Using Tar:$system:\n});
348 my $ret = system($system);
349 if ($ret==0) {
350 $CPAN::Frontend->myprint(qq{Untarred $file successfully\n});
351 } else {
352 if ($? == -1) {
353 $CPAN::Frontend->mydie(sprintf qq{Couldn\'t untar %s: '%s'\n},
354 $file, $!);
355 } elsif ($? & 127) {
356 $CPAN::Frontend->mydie(sprintf qq{Couldn\'t untar %s: child died with signal %d, %s coredump\n},
357 $file, ($? & 127), ($? & 128) ? 'with' : 'without');
358 } else {
359 $CPAN::Frontend->mydie(sprintf qq{Couldn\'t untar %s: child exited with value %d\n},
360 $file, $? >> 8);
361 }
362 }
363 return 1;
364 } else {
365161µs return 1;
366 }
367 } elsif ($prefer==2) { # 2 => modules
368 unless ($CPAN::META->has_usable("Archive::Tar")) {
369 $CPAN::Frontend->mydie("Archive::Tar not installed, please install it to continue");
370 }
371 # Make sure AT does not use uid/gid/permissions in the archive
372 # This leaves it to the user's umask instead
373 local $Archive::Tar::CHMOD = 1;
374 local $Archive::Tar::SAME_PERMISSIONS = 0;
375 # Make sure AT leaves current user as owner
376 local $Archive::Tar::CHOWN = 0;
377 my $tar = Archive::Tar->new($file,1);
378 my $af; # archive file
379 my @af;
380 if ($BUGHUNTING) {
381 # RCS 1.337 had this code, it turned out unacceptable slow but
382 # it revealed a bug in Archive::Tar. Code is only here to hunt
383 # the bug again. It should never be enabled in published code.
384 # GDGraph3d-0.53 was an interesting case according to Larry
385 # Virden.
386 warn(">>>Bughunting code enabled<<< " x 20);
387 for $af ($tar->list_files) {
388 if ($af =~ m!^(/|\.\./)!) {
389 $CPAN::Frontend->mydie("ALERT: Archive contains ".
390 "illegal member [$af]");
391 }
392 $CPAN::Frontend->myprint("$af\n");
393 $tar->extract($af); # slow but effective for finding the bug
394 return if $CPAN::Signal;
395 }
396 } else {
397 for $af ($tar->list_files) {
398 if ($af =~ m!^(/|\.\./)!) {
399 $CPAN::Frontend->mydie("ALERT: Archive contains ".
400 "illegal member [$af]");
401 }
402 if ($tar_verb eq "v" || $tar_verb eq "vv") {
403 $CPAN::Frontend->myprint("$af\n");
404 }
405 push @af, $af;
406 return if $CPAN::Signal;
407 }
408 $tar->extract(@af) or
409 $CPAN::Frontend->mydie("Could not untar with Archive::Tar.");
410 }
411
412 Mac::BuildTools::convert_files([$tar->list_files], 1)
413 if ($^O eq 'MacOS');
414
415 return 1;
416 }
417}
418
419sub unzip {
420 my($self) = @_;
421 my $file = $self->{FILE};
422 if ($CPAN::META->has_inst("Archive::Zip")) {
423 # blueprint of the code from Archive::Zip::Tree::extractTree();
424 my $zip = Archive::Zip->new();
425 my $status;
426 $status = $zip->read($file);
427 $CPAN::Frontend->mydie("Read of file[$file] failed\n")
428 if $status != Archive::Zip::AZ_OK();
429 $CPAN::META->debug("Successfully read file[$file]") if $CPAN::DEBUG;
430 my @members = $zip->members();
431 for my $member ( @members ) {
432 my $af = $member->fileName();
433 if ($af =~ m!^(/|\.\./)!) {
434 $CPAN::Frontend->mydie("ALERT: Archive contains ".
435 "illegal member [$af]");
436 }
437 $status = $member->extractToFileNamed( $af );
438 $CPAN::META->debug("af[$af]status[$status]") if $CPAN::DEBUG;
439 $CPAN::Frontend->mydie("Extracting of file[$af] from zipfile[$file] failed\n") if
440 $status != Archive::Zip::AZ_OK();
441 return if $CPAN::Signal;
442 }
443 return 1;
444 } elsif ( my $unzip = $CPAN::Config->{unzip} ) {
445 my @system = ($unzip, $file);
446 return system(@system) == 0;
447 }
448 else {
449 $CPAN::Frontend->mydie(<<"END");
450
451Can't unzip '$file':
452
453You have not configured an 'unzip' program and do not have Archive::Zip
454installed. Please either install Archive::Zip or else configure 'unzip'
455by running the command 'o conf init unzip' from the CPAN shell prompt.
456
457END
458 }
459}
460
4611;
462
463__END__
 
# spent 58µs within CPAN::Tarzip::CORE:ftsize which was called 2 times, avg 29µs/call: # 2 times (58µs+0s) by CPAN::Tarzip::gtest at line 153, avg 29µs/call
sub CPAN::Tarzip::CORE:ftsize; # opcode
# spent 84µs within CPAN::Tarzip::CORE:match which was called 13 times, avg 6µs/call: # 4 times (25µs+0s) by CPAN::Tarzip::gtest at line 119, avg 6µs/call # 2 times (23µs+0s) by CPAN::Tarzip::new at line 18, avg 12µs/call # 2 times (14µs+0s) by CPAN::Tarzip::TIEHANDLE at line 174, avg 7µs/call # 2 times (8µs+0s) by CPAN::Tarzip::new at line 23, avg 4µs/call # once (10µs+0s) by CPAN::Tarzip::untar at line 251 # once (3µs+0s) by CPAN::Tarzip::untar at line 266 # once (1µs+0s) by CPAN::Tarzip::untar at line 253
sub CPAN::Tarzip::CORE:match; # opcode
# spent 62.1ms within CPAN::Tarzip::CORE:system which was called: # once (62.1ms+0s) by CPAN::Tarzip::untar at line 332
sub CPAN::Tarzip::CORE:system; # opcode