| 1 | package Acme::AutoLoad; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 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(Exporter); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 1 | our $VERSION = '0.07'; | |||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 1 | our $last_fetched = ""; | |||||||||||||||||||||||||||
| 10 | 1 | our $lib = "lib"; | |||||||||||||||||||||||||||
| 11 | 1 | our $hook = \&inc; | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | ▶ | sub ignore {} | |||||||||||||||||||||||||||
|
Subroutine
ignore: not called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 14 | sub import { | ||||||||||||||||||||||||||||
| 15 | 1 | ▶ | warn "DEBUG: Congratulations! Acme::AutoLoad has been loaded.\n" if $ENV{AUTOLOAD_DEBUG}; | ||||||||||||||||||||||||||
|
Subroutine
import: called CC=5 SCAR=16.7
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 16 | 1 | ▶ | $lib = $ENV{AUTOLOAD_LIB} if $ENV{AUTOLOAD_LIB}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 17 | 1 | ▶ | if ($lib =~ m{^[^/]}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 18 | 1 | eval { | |||||||||||||||||||||||||||
| 19 | 1 | require Cwd; | |||||||||||||||||||||||||||
| 20 | 1 | $lib = Cwd::abs_path($lib); | |||||||||||||||||||||||||||
| 21 | }; | ||||||||||||||||||||||||||||
| 22 | } | ||||||||||||||||||||||||||||
| 23 | 1 | ▶ | push @INC, $lib, $hook if $hook; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 24 | 1 | $hook = undef; | |||||||||||||||||||||||||||
| 25 | 1 | return \&ignore; | |||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | sub mkbase { | ||||||||||||||||||||||||||||
| 29 | 4 | ▶ | my $path = shift; | ||||||||||||||||||||||||||
|
Subroutine
mkbase: called CC=6 SCAR=19.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 30 | 4 | ▶ | if ($path =~ s{/+[^/]*$ }{}x) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 31 | 4 | ▶ | return 1 if -d $path; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||
| 33 | 2 | ▶ | die "$path: Not a directory\n" if lstat $path; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 34 | 2 | ▶ | if (mkbase($path)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 35 | 2 | ▶ | warn "DEBUG: mkbase: Creating [$path] ...\n" if $ENV{AUTOLOAD_DEBUG}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 36 | 2 | return mkdir $path, 0755; | |||||||||||||||||||||||||||
| 37 | } | ||||||||||||||||||||||||||||
| 38 | 0 | return 0; | |||||||||||||||||||||||||||
| 39 | } | ||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | sub fetch { | ||||||||||||||||||||||||||||
| 42 | 2 | ▶ | my $url = shift; | ||||||||||||||||||||||||||
|
Subroutine
fetch: called CC=7 SCAR=33.5
Pod
undocumented
| |||||||||||||||||||||||||||||
| 43 | 2 | ▶ | my $recurse = shift || {}; | ||||||||||||||||||||||||||
|
Condition50%1/2
shift() || {}
MC/DC0%0/1
shift() || {}
shift()
Truth table50%1/2
A
A= shift()
| |||||||||||||||||||||||||||||
| 44 | 2 | ▶ | $url = full($url) unless $url =~ m{^\w+://}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 45 | 2 | my $contents = get($url); | |||||||||||||||||||||||||||
| 46 | 0 | $last_fetched = $url; | |||||||||||||||||||||||||||
| 47 | 0 | ▶ | if ($contents =~ m{The document has moved <a href="([^<>]+)">}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 48 | 0 | my $bounce = $1; | |||||||||||||||||||||||||||
| 49 | 0 | ▶ | if ($recurse->{$bounce} && $recurse->{$bounce} > 2) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$recurse->{$bounce} and $recurse->{$bounce} > 2
MC/DC0%0/2
$recurse->{$bounce} and $recurse->{$bounce} > 2
$recurse->{$bounce}
$recurse->{$bounce} > 2
Truth table0%0/3
A and B
A= $recurse->{$bounce}B= $recurse->{$bounce} > 2
| |||||||||||||||||||||||||||||
| 50 | 0 | return $contents; | |||||||||||||||||||||||||||
| 51 | } | ||||||||||||||||||||||||||||
| 52 | 0 | $recurse->{$bounce}++; | |||||||||||||||||||||||||||
| 53 | 0 | ▶ | return fetch($bounce, $recurse) if $recurse->{total}++<20; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 54 | } | ||||||||||||||||||||||||||||
| 55 | 0 | return $contents; | |||||||||||||||||||||||||||
| 56 | } | ||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||
| 58 | # full | ||||||||||||||||||||||||||||
| 59 | # Turn a relative URL into a full URL | ||||||||||||||||||||||||||||
| 60 | sub full { | ||||||||||||||||||||||||||||
| 61 | 0 | ▶ | my $rel = shift; | ||||||||||||||||||||||||||
|
Subroutine
full: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 62 | 0 | ▶ | if ($rel =~ m{http://} || $last_fetched !~ m{^(http://[^/]+)(/?.*)}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$rel =~ m[http://] or not $Acme::AutoLoad::last_fetched =~ m[^(http://[^/]+)(/?.*)]
MC/DC0%0/2
$rel =~ m[http://] or not $Acme::AutoLoad::last_fetched =~ m[^(http://[^/]+)(/?.*)]
$rel =~ m[http://]
not $Acme::AutoLoad::last_fetched =~ m[^(http://[^/]+)(/?.*)]
Truth table0%0/3
A or not(B)
A= $rel =~ m[http://]B= not $Acme::AutoLoad::last_fetched =~ m[^(http://[^/]+)(/?.*)]
| |||||||||||||||||||||||||||||
| 63 | 0 | return $rel; | |||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||
| 65 | 0 | my $h = $1; | |||||||||||||||||||||||||||
| 66 | 0 | my $p = $2; | |||||||||||||||||||||||||||
| 67 | 0 | ▶ | if ($rel =~ m{^/}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 68 | 0 | return "$h$rel"; | |||||||||||||||||||||||||||
| 69 | } | ||||||||||||||||||||||||||||
| 70 | 0 | $p =~ s{[^/]*$ }{}x; | |||||||||||||||||||||||||||
| 71 | 0 | return "$h$p$rel"; | |||||||||||||||||||||||||||
| 72 | } | ||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||
| 74 | # fly | ||||||||||||||||||||||||||||
| 75 | # Create a stub module to load the real file on-the-fly if needed. | ||||||||||||||||||||||||||||
| 76 | sub fly { | ||||||||||||||||||||||||||||
| 77 | 0 | ▶ | my $inc = shift; | ||||||||||||||||||||||||||
|
Subroutine
fly: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 78 | 0 | my $url = shift; | |||||||||||||||||||||||||||
| 79 | 0 | my $write = shift; | |||||||||||||||||||||||||||
| 80 | 0 | ▶ | warn "DEBUG: Creating stub for [$inc] in order to download [$url] later if needed.\n" if $ENV{AUTOLOAD_DEBUG}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 81 | 0 | my $contents = q{ | |||||||||||||||||||||||||||
| 82 | my $url = q{$URL}; | ||||||||||||||||||||||||||||
| 83 | my $myself = $INC{"$inc"} || __FILE__; | ||||||||||||||||||||||||||||
| 84 | warn "DEBUG: Downloading [$url] right now ...\n" if $ENV{AUTOLOAD_DEBUG}; | ||||||||||||||||||||||||||||
| 85 | my $m = Acme::AutoLoad::fetch($url); | ||||||||||||||||||||||||||||
| 86 | if ($m =~ /package/) { | ||||||||||||||||||||||||||||
| 87 | warn "DEBUG: Contents appear fine. Commencing BRICK OVER ...\n" if $ENV{AUTOLOAD_DEBUG}; | ||||||||||||||||||||||||||||
| 88 | if (open my $fh, ">", $myself) { | ||||||||||||||||||||||||||||
| 89 | print $fh $m; | ||||||||||||||||||||||||||||
| 90 | close $fh; | ||||||||||||||||||||||||||||
| 91 | } | ||||||||||||||||||||||||||||
| 92 | else { | ||||||||||||||||||||||||||||
| 93 | warn "$myself: WARNING: Unable to repair! $!\n"; | ||||||||||||||||||||||||||||
| 94 | } | ||||||||||||||||||||||||||||
| 95 | warn "DEBUG: Forcing re-evaluation of fresh module contents ...\n" if $ENV{AUTOLOAD_DEBUG}; | ||||||||||||||||||||||||||||
| 96 | my $e = eval $m; | ||||||||||||||||||||||||||||
| 97 | if ($e) { | ||||||||||||||||||||||||||||
| 98 | $INC{"$inc"} = $url; | ||||||||||||||||||||||||||||
| 99 | $e; | ||||||||||||||||||||||||||||
| 100 | } | ||||||||||||||||||||||||||||
| 101 | else { | ||||||||||||||||||||||||||||
| 102 | die "$url: $@\n"; | ||||||||||||||||||||||||||||
| 103 | } | ||||||||||||||||||||||||||||
| 104 | } | ||||||||||||||||||||||||||||
| 105 | else { | ||||||||||||||||||||||||||||
| 106 | die "$url: STANKY! $m\n"; | ||||||||||||||||||||||||||||
| 107 | } | ||||||||||||||||||||||||||||
| 108 | }; | ||||||||||||||||||||||||||||
| 109 | 0 | $contents =~ s/\s+/ /g; | |||||||||||||||||||||||||||
| 110 | 0 | $contents =~ s/([\;\{]+)\s+/$1\n/g; | |||||||||||||||||||||||||||
| 111 | 0 | $contents =~ s/^\s+//; | |||||||||||||||||||||||||||
| 112 | 0 | $contents =~ s/\s*$/\n/; | |||||||||||||||||||||||||||
| 113 | # Fake interpolation | ||||||||||||||||||||||||||||
| 114 | 0 | $contents =~ s/\$URL/$url/g; | |||||||||||||||||||||||||||
| 115 | 0 | $contents =~ s/\$inc/$inc/g; | |||||||||||||||||||||||||||
| 116 | 0 | ▶ | if ($write) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 117 | 0 | mkbase($write); | |||||||||||||||||||||||||||
| 118 | 0 | $contents =~ s/(\$myself)\s*=.*?;/$1 = "$write";/; | |||||||||||||||||||||||||||
| 119 | 0 | ▶ | open my $fh, ">", $write or die "$write: open: OUCH! $!"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 120 | 0 | print $fh $contents; | |||||||||||||||||||||||||||
| 121 | 0 | close $fh; | |||||||||||||||||||||||||||
| 122 | } | ||||||||||||||||||||||||||||
| 123 | 0 | return $contents; | |||||||||||||||||||||||||||
| 124 | } | ||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||
| 126 | sub inc { | ||||||||||||||||||||||||||||
| 127 | 2 | ▶ | my $i = shift; | ||||||||||||||||||||||||||
|
Subroutine
inc: called CC=21 SCAR=54.5
Pod
undocumented
| |||||||||||||||||||||||||||||
| 128 | 2 | my $f = shift; | |||||||||||||||||||||||||||
| 129 | 2 | my $cache_file = "$lib/$f"; | |||||||||||||||||||||||||||
| 130 | 2 | ▶ | if (-f $cache_file) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 131 | 0 | warn "$cache_file: Broken module. Can't continue.\n"; | |||||||||||||||||||||||||||
| 132 | 0 | return (); | |||||||||||||||||||||||||||
| 133 | } | ||||||||||||||||||||||||||||
| 134 | 2 | ▶ | mkbase($cache_file) or die "$cache_file: Unable to create! $!\n"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 135 | 2 | ▶ | shift @INC if $INC[0] eq \&ignore; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||
| 137 | 2 | ▶ | if ($f =~ m{^([\w/]+)\.pm}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 138 | 2 | my $dist = $1; | |||||||||||||||||||||||||||
| 139 | 2 | my $mod = $1; | |||||||||||||||||||||||||||
| 140 | 2 | $f = "$1.pm"; | |||||||||||||||||||||||||||
| 141 | 2 | $dist =~ s{/+}{-}g; | |||||||||||||||||||||||||||
| 142 | 2 | $mod =~ s{/+}{::}g; | |||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||
| 144 | 2 | ▶ | my $mapper = $ENV{AUTOLOAD_SRC} || "http://fastapi.metacpan.org/v1/release"; | ||||||||||||||||||||||||||
|
Condition50%1/2
$ENV{'AUTOLOAD_SRC'} || 'http://fastapi.metacpan.org/v1/release'
MC/DC0%0/1
$ENV{'AUTOLOAD_SRC'} || 'http://fastapi.metacpan.org/v1/release'
$ENV{'AUTOLOAD_SRC'}
Truth table50%1/2
A
A= $ENV{'AUTOLOAD_SRC'}
| |||||||||||||||||||||||||||||
| 145 | 2 | my $search = fetch("$mapper/$dist/"); | |||||||||||||||||||||||||||
| 146 | 0 | ▶ | warn "DEBUG: Probed: $last_fetched\n" if $ENV{AUTOLOAD_DEBUG}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 147 | 0 | ▶ | if ($search =~ m{download_url.*?(\w+/[\w\d\-\.]+)\.tar.gz}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 148 | 0 | my $src = full("/source/$1/"); | |||||||||||||||||||||||||||
| 149 | 0 | ▶ | if (my $MANIFEST = fetch "$src/MANIFEST") { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 150 | 0 | ▶ | $src = $1 if $last_fetched =~ m{^(.*?)/+MANIFEST}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 151 | 0 | ▶ | if ($MANIFEST =~ m{^lib/}m) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 152 | 0 | ▶ | warn "DEBUG: YEY! Found a lib/ somewhere!\n" if $ENV{AUTOLOAD_DEBUG}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 153 | 0 | ▶ | while ($MANIFEST =~ s{^lib/(\S+\.pm)}{ }m) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 154 | 0 | my $remote = $1; | |||||||||||||||||||||||||||
| 155 | 0 | ▶ | warn "DEBUG: MATCH [lib/$remote] RIPPED OUT\n" if $ENV{AUTOLOAD_DEBUG}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 156 | 0 | $last_fetched = "$src/MANIFEST"; | |||||||||||||||||||||||||||
| 157 | 0 | my $cache = "$lib/$remote"; | |||||||||||||||||||||||||||
| 158 | 0 | ▶ | if (!-f $cache) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 159 | 0 | my $full = full("lib/$remote"); | |||||||||||||||||||||||||||
| 160 | 0 | fly($remote,$full,$cache); | |||||||||||||||||||||||||||
| 161 | } | ||||||||||||||||||||||||||||
| 162 | } | ||||||||||||||||||||||||||||
| 163 | } | ||||||||||||||||||||||||||||
| 164 | else { | ||||||||||||||||||||||||||||
| 165 | 0 | ▶ | warn "DEBUG: Oh, too bad there is no magic lib folder in the MANIFEST [$MANIFEST]\n" if $ENV{AUTOLOAD_DEBUG}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 166 | } | ||||||||||||||||||||||||||||
| 167 | 0 | ▶ | if (!-f $cache_file) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 168 | # Old versions of h2xs used to toss the end module right into the base folder? | ||||||||||||||||||||||||||||
| 169 | 0 | ▶ | if ($f =~ m{(\w+\.pm)}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 170 | 0 | my $stub = $1; | |||||||||||||||||||||||||||
| 171 | 0 | ▶ | if ($MANIFEST =~ /^(.*$stub)$/m) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 172 | 0 | my $stab = $1; | |||||||||||||||||||||||||||
| 173 | 0 | $last_fetched = "$src/MANIFEST"; | |||||||||||||||||||||||||||
| 174 | 0 | $stab = full($stab); | |||||||||||||||||||||||||||
| 175 | 0 | fly($f, $stab, $cache_file); | |||||||||||||||||||||||||||
| 176 | } | ||||||||||||||||||||||||||||
| 177 | else { | ||||||||||||||||||||||||||||
| 178 | 0 | ▶ | warn "WARNING: No [$stub] in $src/MANIFEST? [$MANIFEST]" if $ENV{AUTOLOAD_DEBUG}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 179 | 0 | die "No [$stub] in $src/MANIFEST"; | |||||||||||||||||||||||||||
| 180 | } | ||||||||||||||||||||||||||||
| 181 | } | ||||||||||||||||||||||||||||
| 182 | else { | ||||||||||||||||||||||||||||
| 183 | 0 | warn "WARNING: Unable to extract stub from file [$f] ??\n"; | |||||||||||||||||||||||||||
| 184 | } | ||||||||||||||||||||||||||||
| 185 | } | ||||||||||||||||||||||||||||
| 186 | } | ||||||||||||||||||||||||||||
| 187 | else { | ||||||||||||||||||||||||||||
| 188 | 0 | warn "$src: Incomplete distribution! Broken MANIFEST file?\n"; | |||||||||||||||||||||||||||
| 189 | } | ||||||||||||||||||||||||||||
| 190 | } | ||||||||||||||||||||||||||||
| 191 | } | ||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||
| 193 | 0 | ▶ | if (open my $fh, "<", $cache_file) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 194 | 0 | $INC{$f} = $cache_file; | |||||||||||||||||||||||||||
| 195 | 0 | return $fh; | |||||||||||||||||||||||||||
| 196 | } | ||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||
| 198 | 0 | return (); | |||||||||||||||||||||||||||
| 199 | } | ||||||||||||||||||||||||||||
| 200 | |||||||||||||||||||||||||||||
| 201 | sub get { | ||||||||||||||||||||||||||||
| 202 | 2 | ▶ | local $_ = shift; | ||||||||||||||||||||||||||
|
Subroutine
get: called CC=3 SCAR=13.7
Pod
undocumented
| |||||||||||||||||||||||||||||
| 203 | 2 | s{^http(s|)://}{}i; | |||||||||||||||||||||||||||
| 204 | 2 | s{^([\w\-\.\:]+)$}{$1/}; | |||||||||||||||||||||||||||
| 205 | 2 | s{^([\w\-\.]+)/}{$1:80/}; | |||||||||||||||||||||||||||
| 206 | 2 | ▶ | if (m{^([\w\-\.]+:\d+)(/.*)}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 207 | 2 | my $host = $1; | |||||||||||||||||||||||||||
| 208 | 2 | my $path = $2; | |||||||||||||||||||||||||||
| 209 | 2 | ▶ | my $r = new IO::Socket::INET $host or return warn "$host$!\n"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 210 | 0 | $host =~ s/:\d+$//; | |||||||||||||||||||||||||||
| 211 | 0 | print $r "GET $path HTTP/1.0\r\nUser-Agent: Acme::AutoLoad/url::get\r\nHost: $host\r\n\r\n"; | |||||||||||||||||||||||||||
| 212 | 0 | local $/; | |||||||||||||||||||||||||||
| 213 | 0 | return [split/[\r\n]{3,}/,<$r>,2]->[1]; | |||||||||||||||||||||||||||
| 214 | } | ||||||||||||||||||||||||||||
| 215 | 0 | return ""; | |||||||||||||||||||||||||||
| 216 | } | ||||||||||||||||||||||||||||
| 217 | |||||||||||||||||||||||||||||
| 218 | 1 | ▶ | $INC{"Acme/AutoLoad.pm"} ||= __FILE__; | ||||||||||||||||||||||||||
|
Condition50%1/2
$INC{"Acme/AutoLoad.pm"} ||= __FILE__
MC/DC0%0/1
$INC{"Acme/AutoLoad.pm"} ||= __FILE__
$INC{"Acme/AutoLoad.pm"}
Truth table50%1/2
A
A= $INC{"Acme/AutoLoad.pm"}
| |||||||||||||||||||||||||||||
| 219 | |||||||||||||||||||||||||||||
| 220 | 1 | ▶ | warn "DEBUG: Congratulations! Acme::AutoLoad was compiled fine.\n" if $ENV{AUTOLOAD_DEBUG}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 221 | |||||||||||||||||||||||||||||
| 222 | 1 | 1; | |||||||||||||||||||||||||||
| 223 | __END__ | ||||||||||||||||||||||||||||