| 1 | # -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*- | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | package CPAN::Debug; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 26 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 26 | ▶ | use vars qw($VERSION); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 26 | $VERSION = "5.5002"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | # module is internal to CPAN.pm | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 26 | %CPAN::DEBUG = qw[ | |||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | CPAN 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | Index 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | InfoObj 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | Author 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | Distribution 16 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | Bundle 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | Module 64 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | CacheMgr 128 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | Complete 256 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | FTP 512 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | Shell 1024 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | Eval 2048 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | HandleConfig 4096 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | Tarzip 8192 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | Version 16384 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | Queue 32768 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | FirstTime 65536 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 26 | ▶ | $CPAN::DEBUG ||= 0; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$CPAN::DEBUG ||= 0
MC/DC0%0/1
$CPAN::DEBUG ||= 0
$CPAN::DEBUG
Truth table50%1/2
A
A= $CPAN::DEBUG
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | #-> sub CPAN::Debug::debug ; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | 75 | ▶ | sub debug { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
debug: called CC=12 SCAR=43.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | ▶ | my($self,$arg) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
debug: not called CC=12 SCAR=43.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 0 | my @caller; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | 0 | my $i = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | 0 | while () { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | 0 | ▶ | my(@c) = (caller($i))[0 .. ($i ? 3 : 2)]; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 0 | ▶ | last unless defined $c[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 0 | push @caller, \@c; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | 0 | for (0,3) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | 0 | ▶ | last if $_ > $#c; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | 0 | $c[$_] =~ s/.*:://; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | 0 | for (1) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | 0 | $c[$_] =~ s|.*/||; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | 0 | ▶ | last if ++$i>=3; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | 0 | pop @caller; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | 0 | ▶ | if ($CPAN::DEBUG{$caller[0][0]} & $CPAN::DEBUG) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 0 | ▶ | if ($arg and ref $arg) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition0%0/6
$arg and ref $arg
$arg and ref $arg
MC/DC0%0/2
$arg and ref $arg
$arg
ref $arg
MC/DC0%0/2
$arg and ref $arg
$arg
ref $arg
Truth table0%0/3
A and B
A= $argB= ref $arg
Truth table0%0/3
A and B
A= $argB= ref $arg
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 0 | eval { require Data::Dumper }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 0 | ▶ | if ($@) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | 0 | $CPAN::Frontend->myprint("Debug(\n" . $arg->as_string . ")\n"); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 0 | local $Data::Dumper::Sortkeys = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | 0 | $CPAN::Frontend->myprint("Debug(\n" . Data::Dumper::Dumper($arg) . ")\n"); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | 0 | my $outer = ""; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | 0 | local $" = ","; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 0 | ▶ | if (@caller>1) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | 0 | $outer = ",[@{$caller[1]}]"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 0 | $CPAN::Frontend->myprint("Debug(@{$caller[0]}$outer): $arg\n"); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | 26 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||