| 1 | package Test::AnyEventFTPServer; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 22 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 22 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 22 | ▶ | use 5.010; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 22 | ▶ | use Moo; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 22 | ▶ | use URI; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 22 | ▶ | use AnyEvent; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | 22 | ▶ | use Test2::API qw( context ); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 22 | ▶ | use Path::Class qw( tempdir ); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 22 | extends 'AnyEvent::FTP::Server'; | |||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | # ABSTRACT: Test (non-blocking) ftp clients against a real FTP server | ||||||||||||||||||||||||||||
| 15 | 22 | our $VERSION = '0.19'; # VERSION | |||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | 22 | has test_uri => ( | |||||||||||||||||||||||||||
| 19 | is => 'ro', | ||||||||||||||||||||||||||||
| 20 | required => 1, | ||||||||||||||||||||||||||||
| 21 | ); | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 22 | has res => ( | |||||||||||||||||||||||||||
| 25 | is => 'rw', | ||||||||||||||||||||||||||||
| 26 | ); | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | 22 | has content => ( | |||||||||||||||||||||||||||
| 30 | is => 'rw', | ||||||||||||||||||||||||||||
| 31 | default => '', | ||||||||||||||||||||||||||||
| 32 | ); | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | has auto_login => ( | ||||||||||||||||||||||||||||
| 36 | is => 'rw', | ||||||||||||||||||||||||||||
| 37 | 26 | ▶ | default => sub { 1 }, | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 38 | 22 | ); | |||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | has _client => ( | ||||||||||||||||||||||||||||
| 41 | is => 'ro', | ||||||||||||||||||||||||||||
| 42 | lazy => 1, | ||||||||||||||||||||||||||||
| 43 | default => sub { | ||||||||||||||||||||||||||||
| 44 | 24 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||
| 45 | 24 | require AnyEvent::FTP::Client; | |||||||||||||||||||||||||||
| 46 | 24 | my $client = AnyEvent::FTP::Client->new; | |||||||||||||||||||||||||||
| 47 | 24 | my $cv = AnyEvent->condvar; | |||||||||||||||||||||||||||
| 48 | my $timer = AnyEvent->timer( | ||||||||||||||||||||||||||||
| 49 | after => 5, | ||||||||||||||||||||||||||||
| 50 | 0 | ▶ | cb => sub { $cv->croak("timeout connecting with ftp client") }, | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 51 | 24 | ); | |||||||||||||||||||||||||||
| 52 | 24 | ▶ | if($self->auto_login) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 53 | { | ||||||||||||||||||||||||||||
| 54 | $client->connect($self->test_uri) | ||||||||||||||||||||||||||||
| 55 | 22 | ▶ | ->cb(sub { $cv->send }); | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 56 | } | ||||||||||||||||||||||||||||
| 57 | else | ||||||||||||||||||||||||||||
| 58 | { | ||||||||||||||||||||||||||||
| 59 | $client->connect($self->test_uri->host, $self->test_uri->port) | ||||||||||||||||||||||||||||
| 60 | 2 | ▶ | ->cb(sub { $cv->send }); | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 61 | } | ||||||||||||||||||||||||||||
| 62 | 24 | $cv->recv; | |||||||||||||||||||||||||||
| 63 | 24 | $client; | |||||||||||||||||||||||||||
| 64 | }, | ||||||||||||||||||||||||||||
| 65 | 22 | ); | |||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||
| 68 | sub create_ftpserver_ok (;$$) | ||||||||||||||||||||||||||||
| 69 | { | ||||||||||||||||||||||||||||
| 70 | 26 | ▶ | my($context, $message) = @_; | ||||||||||||||||||||||||||
|
Subroutine
create_ftpserver_ok: called CC=6 SCAR=19.5
Pod
documented
| |||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||
| 72 | 26 | my $ctx = context(); | |||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||
| 74 | 26 | my $uri = URI->new("ftp://127.0.0.1"); | |||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||
| 76 | 26 | ▶ | $context //= 'Memory'; | ||||||||||||||||||||||||||
|
Condition100%2/2
$context //= "Memory"
MC/DC100%1/1
$context //= "Memory"
$context
Truth table100%2/2
A
A= $context
| |||||||||||||||||||||||||||||
| 77 | 26 | ▶ | $context = "AnyEvent::FTP::Server::Context::$context" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 78 | unless $context =~ /::/; | ||||||||||||||||||||||||||||
| 79 | 26 | my $name = (split /::/, $context)[-1]; | |||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||
| 81 | 26 | my $user = join '', map { chr(ord('a') + int rand(26)) } (1..10); | |||||||||||||||||||||||||||
| 82 | 26 | my $pass = join '', map { chr(ord('a') + int rand(26)) } (1..10); | |||||||||||||||||||||||||||
| 83 | 26 | $uri->userinfo(join(':', $user, $pass)); | |||||||||||||||||||||||||||
| 84 | |||||||||||||||||||||||||||||
| 85 | 26 | my $server; | |||||||||||||||||||||||||||
| 86 | 26 | eval { | |||||||||||||||||||||||||||
| 87 | 26 | $server = Test::AnyEventFTPServer->new( | |||||||||||||||||||||||||||
| 88 | default_context => $context, | ||||||||||||||||||||||||||||
| 89 | hostname => '127.0.0.1', | ||||||||||||||||||||||||||||
| 90 | port => undef, | ||||||||||||||||||||||||||||
| 91 | test_uri => $uri, | ||||||||||||||||||||||||||||
| 92 | ); | ||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||
| 94 | 26 | ▶ | if($ENV{AEF_DEBUG}) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 95 | { | ||||||||||||||||||||||||||||
| 96 | $server->on_connect(sub { | ||||||||||||||||||||||||||||
| 97 | 0 | ▶ | my $con = shift; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 98 | 0 | $ctx->note("CONNECT"); | |||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||
| 100 | $con->on_request(sub { | ||||||||||||||||||||||||||||
| 101 | 0 | ▶ | my $raw = shift; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 102 | 0 | $ctx->note("CLIENT: $raw"); | |||||||||||||||||||||||||||
| 103 | 0 | }); | |||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||
| 105 | $con->on_response(sub { | ||||||||||||||||||||||||||||
| 106 | 0 | ▶ | my $raw = shift; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 107 | 0 | $ctx->note("SERVER: $raw"); | |||||||||||||||||||||||||||
| 108 | 0 | }); | |||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||
| 110 | $con->on_close(sub { | ||||||||||||||||||||||||||||
| 111 | 0 | ▶ | $ctx->note("DISCONNECT"); | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 112 | 0 | }); | |||||||||||||||||||||||||||
| 113 | 0 | }); | |||||||||||||||||||||||||||
| 114 | } | ||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||
| 116 | $server->on_connect(sub { | ||||||||||||||||||||||||||||
| 117 | shift->context->authenticator(sub { | ||||||||||||||||||||||||||||
| 118 | 29 | ▶ | return $_[0] eq $user && $_[1] eq $pass; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.2
Condition66%2/3
$_[0] eq $user && $_[1] eq $pass
MC/DC50%1/2
$_[0] eq $user && $_[1] eq $pass
$_[0] eq $user
$_[1] eq $pass
Truth table66%2/3
A && B
A= $_[0] eq $userB= $_[1] eq $pass
| |||||||||||||||||||||||||||||
| 119 | 29 | ▶ | }); | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 120 | 26 | }); | |||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||
| 122 | 26 | my $cv = AnyEvent->condvar; | |||||||||||||||||||||||||||
| 123 | my $timer = AnyEvent->timer( | ||||||||||||||||||||||||||||
| 124 | after => 5, | ||||||||||||||||||||||||||||
| 125 | 0 | ▶ | cb => sub { $cv->croak("timeout creating ftp server") }, | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 126 | 26 | ); | |||||||||||||||||||||||||||
| 127 | $server->on_bind(sub { | ||||||||||||||||||||||||||||
| 128 | 26 | ▶ | $uri->port(shift); | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 129 | 26 | $cv->send; | |||||||||||||||||||||||||||
| 130 | 26 | }); | |||||||||||||||||||||||||||
| 131 | 26 | $server->start; | |||||||||||||||||||||||||||
| 132 | 26 | $cv->recv; | |||||||||||||||||||||||||||
| 133 | }; | ||||||||||||||||||||||||||||
| 134 | 26 | my $error = $@; | |||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||
| 136 | 26 | ▶ | $message //= "created FTP ($name) server at $uri"; | ||||||||||||||||||||||||||
|
Condition50%1/2
$message //= "created FTP ($name) server at $uri"
MC/DC0%0/1
$message //= "created FTP ($name) server at $uri"
$message
Truth table50%1/2
A
A= $message
| |||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||
| 138 | 26 | $ctx->ok($error eq '', $message); | |||||||||||||||||||||||||||
| 139 | 26 | ▶ | $ctx->diag($error) if $error; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 140 | 26 | $ctx->release; | |||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||
| 142 | 26 | $server; | |||||||||||||||||||||||||||
| 143 | } | ||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||
| 146 | sub connect_ftpclient_ok | ||||||||||||||||||||||||||||
| 147 | { | ||||||||||||||||||||||||||||
| 148 | 5 | ▶ | my($self, $message) = @_; | ||||||||||||||||||||||||||
|
Subroutine
connect_ftpclient_ok: called CC=4 SCAR=14.3
Pod
documented
| |||||||||||||||||||||||||||||
| 149 | 5 | my $client; | |||||||||||||||||||||||||||
| 150 | 5 | eval { | |||||||||||||||||||||||||||
| 151 | 5 | require AnyEvent::FTP::Client; | |||||||||||||||||||||||||||
| 152 | 5 | $client = AnyEvent::FTP::Client->new; | |||||||||||||||||||||||||||
| 153 | 5 | my $cv = AnyEvent->condvar; | |||||||||||||||||||||||||||
| 154 | my $timer = AnyEvent->timer( | ||||||||||||||||||||||||||||
| 155 | after => 5, | ||||||||||||||||||||||||||||
| 156 | 0 | ▶ | cb => sub { $cv->croak("timeout connecting with ftp client") }, | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 157 | 5 | ); | |||||||||||||||||||||||||||
| 158 | 5 | ▶ | if($self->auto_login) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 159 | { | ||||||||||||||||||||||||||||
| 160 | $client->connect($self->test_uri) | ||||||||||||||||||||||||||||
| 161 | 5 | ▶ | ->cb(sub { $cv->send }); | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 162 | } | ||||||||||||||||||||||||||||
| 163 | else | ||||||||||||||||||||||||||||
| 164 | { | ||||||||||||||||||||||||||||
| 165 | $client->connect($self->tesT_uri->host, $self->test_uri->port) | ||||||||||||||||||||||||||||
| 166 | 0 | ▶ | ->cb(sub { $cv->send }); | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 167 | } | ||||||||||||||||||||||||||||
| 168 | 5 | $cv->recv; | |||||||||||||||||||||||||||
| 169 | }; | ||||||||||||||||||||||||||||
| 170 | 5 | my $error = $@; | |||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||
| 172 | 5 | ▶ | $message //= "connected to FTP server at " . $self->test_uri; | ||||||||||||||||||||||||||
|
Condition50%1/2
$message //= 'connected to FTP server at ' . $self->test_uri
MC/DC0%0/1
$message //= 'connected to FTP server at ' . $self->test_uri
$message
Truth table50%1/2
A
A= $message
| |||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||
| 174 | 5 | my $ctx = context(); | |||||||||||||||||||||||||||
| 175 | 5 | $ctx->ok($error eq '', $message); | |||||||||||||||||||||||||||
| 176 | 5 | ▶ | $ctx->diag($error) if $error; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 177 | 5 | $ctx->release; | |||||||||||||||||||||||||||
| 178 | |||||||||||||||||||||||||||||
| 179 | 5 | $client; | |||||||||||||||||||||||||||
| 180 | } | ||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||
| 183 | sub help_coverage_ok | ||||||||||||||||||||||||||||
| 184 | { | ||||||||||||||||||||||||||||
| 185 | 10 | ▶ | my($self, $class, $message) = @_; | ||||||||||||||||||||||||||
|
Subroutine
help_coverage_ok: called CC=11 SCAR=25.5
Pod
documented
| |||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||
| 187 | 10 | ▶ | $class //= $self->default_context; | ||||||||||||||||||||||||||
|
Condition66%2/3
$class //= $self->default_context
MC/DC0%0/2
$class //= $self->default_context
$class
$self->default_context
Truth table66%2/3
A //= B
A= $classB= $self->default_context
| |||||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||
| 189 | 10 | my @missing; | |||||||||||||||||||||||||||
| 190 | |||||||||||||||||||||||||||||
| 191 | 10 | my $client = eval { $self->_client }; | |||||||||||||||||||||||||||
| 192 | 10 | my $error = $@; | |||||||||||||||||||||||||||
| 193 | |||||||||||||||||||||||||||||
| 194 | 10 | my $count = 0; | |||||||||||||||||||||||||||
| 195 | 10 | ▶ | unless($error) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 196 | { | ||||||||||||||||||||||||||||
| 197 | 10 | ▶ | foreach my $cmd (map { uc $_ } grep s/^cmd_//, eval qq{ use $class; keys \%${class}::;}) | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 198 | { | ||||||||||||||||||||||||||||
| 199 | 96 | ▶ | if((eval { $client->help($cmd)->recv } || $@)->code != 214) | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
eval {
do {
$client->help($cmd)->recv
}
} || $@
MC/DC0%0/2
eval {
do {
$client->help($cmd)->recv
}
} || $@
eval {
do {
$client->help($cmd)->recv
}
}
$@
Truth table33%1/3
A || B
A= eval {
do {
$client->help($cmd)->recv
}
}B= $@
| |||||||||||||||||||||||||||||
| 200 | 0 | { push @missing, $cmd } | |||||||||||||||||||||||||||
| 201 | 96 | $count++; | |||||||||||||||||||||||||||
| 202 | } | ||||||||||||||||||||||||||||
| 203 | } | ||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||
| 205 | 10 | ▶ | $message //= "help coverage for $class"; | ||||||||||||||||||||||||||
|
Condition50%1/2
$message //= "help coverage for $class"
MC/DC0%0/1
$message //= "help coverage for $class"
$message
Truth table50%1/2
A
A= $message
| |||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||
| 207 | 10 | my $ctx = context(); | |||||||||||||||||||||||||||
| 208 | 10 | ▶ | $ctx->ok($error eq '' && @missing == 0, $message); | ||||||||||||||||||||||||||
|
Condition33%1/3
$error eq '' && @missing == 0
MC/DC0%0/2
$error eq '' && @missing == 0
$error eq ''
@missing == 0
Truth table33%1/3
A && B
A= $error eq ''B= @missing == 0
| |||||||||||||||||||||||||||||
| 209 | 10 | ▶ | $ctx->diag($error) if $error; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 210 | 10 | ▶ | $ctx->diag("commands missing help: @missing") if @missing; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 211 | 10 | ▶ | $ctx->diag("didn't find ANY commands for class: $class") | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 212 | if $count == 0; | ||||||||||||||||||||||||||||
| 213 | 10 | $ctx->release; | |||||||||||||||||||||||||||
| 214 | |||||||||||||||||||||||||||||
| 215 | 10 | $self; | |||||||||||||||||||||||||||
| 216 | } | ||||||||||||||||||||||||||||
| 217 | |||||||||||||||||||||||||||||
| 218 | |||||||||||||||||||||||||||||
| 219 | sub command_ok | ||||||||||||||||||||||||||||
| 220 | { | ||||||||||||||||||||||||||||
| 221 | 145 | ▶ | my($self, $command, $args, $message) = @_; | ||||||||||||||||||||||||||
|
Subroutine
command_ok: called CC=6 SCAR=18.7
Pod
documented
| |||||||||||||||||||||||||||||
| 222 | |||||||||||||||||||||||||||||
| 223 | 145 | my $client = eval { $self->_client }; | |||||||||||||||||||||||||||
| 224 | 145 | my $error = $@; | |||||||||||||||||||||||||||
| 225 | |||||||||||||||||||||||||||||
| 226 | 145 | ▶ | unless($error) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 227 | { | ||||||||||||||||||||||||||||
| 228 | 145 | ▶ | my $res = (eval { $client->push_command([$command, $args])->recv } || $@); | ||||||||||||||||||||||||||
|
Condition66%2/3
eval {
do {
$client->push_command([$command, $args])->recv
}
} || $@
MC/DC0%0/2
eval {
do {
$client->push_command([$command, $args])->recv
}
} || $@
eval {
do {
$client->push_command([$command, $args])->recv
}
}
$@
Truth table66%2/3
A || B
A= eval {
do {
$client->push_command([$command, $args])->recv
}
}B= $@
| |||||||||||||||||||||||||||||
| 229 | 145 | ▶ | if(eval { $res->isa('AnyEvent::FTP::Client::Response') }) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 230 | 145 | { $self->res($res) } | |||||||||||||||||||||||||||
| 231 | else | ||||||||||||||||||||||||||||
| 232 | 0 | { $error = $res; $self->res(undef) } | |||||||||||||||||||||||||||
| 233 | } | ||||||||||||||||||||||||||||
| 234 | |||||||||||||||||||||||||||||
| 235 | 145 | ▶ | $message //= "command: $command"; | ||||||||||||||||||||||||||
|
Condition50%1/2
$message //= "command: $command"
MC/DC0%0/1
$message //= "command: $command"
$message
Truth table50%1/2
A
A= $message
| |||||||||||||||||||||||||||||
| 236 | |||||||||||||||||||||||||||||
| 237 | 145 | my $ctx = context(); | |||||||||||||||||||||||||||
| 238 | 145 | $ctx->ok($error eq '', $message); | |||||||||||||||||||||||||||
| 239 | 145 | ▶ | $ctx->diag($error) if $error; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 240 | 145 | $ctx->release; | |||||||||||||||||||||||||||
| 241 | |||||||||||||||||||||||||||||
| 242 | 145 | $self; | |||||||||||||||||||||||||||
| 243 | } | ||||||||||||||||||||||||||||
| 244 | |||||||||||||||||||||||||||||
| 245 | |||||||||||||||||||||||||||||
| 246 | sub code_is | ||||||||||||||||||||||||||||
| 247 | { | ||||||||||||||||||||||||||||
| 248 | 140 | ▶ | my($self, $code, $message) = @_; | ||||||||||||||||||||||||||
|
Subroutine
code_is: called CC=4 SCAR=14.0
Pod
documented
| |||||||||||||||||||||||||||||
| 249 | |||||||||||||||||||||||||||||
| 250 | 140 | ▶ | $message //= "response code is $code"; | ||||||||||||||||||||||||||
|
Condition50%1/2
$message //= "response code is $code"
MC/DC0%0/1
$message //= "response code is $code"
$message
Truth table50%1/2
A
A= $message
| |||||||||||||||||||||||||||||
| 251 | |||||||||||||||||||||||||||||
| 252 | 140 | my $ctx = context(); | |||||||||||||||||||||||||||
| 253 | 140 | ▶ | my $actual = eval { $self->res->code } // 'undefined'; | ||||||||||||||||||||||||||
|
Condition50%1/2
eval {
do {
$self->res->code
}
} // "undefined"
MC/DC0%0/1
eval {
do {
$self->res->code
}
} // "undefined"
eval {
do {
$self->res->code
}
}
Truth table50%1/2
A
A= eval {
do {
$self->res->code
}
}
| |||||||||||||||||||||||||||||
| 254 | 140 | $ctx->ok($actual == $code, $message); | |||||||||||||||||||||||||||
| 255 | 140 | ▶ | $ctx->diag("actual code returned is $actual") | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 256 | unless $actual == $code; | ||||||||||||||||||||||||||||
| 257 | 140 | $ctx->release; | |||||||||||||||||||||||||||
| 258 | |||||||||||||||||||||||||||||
| 259 | 140 | $self; | |||||||||||||||||||||||||||
| 260 | } | ||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||
| 262 | |||||||||||||||||||||||||||||
| 263 | sub code_like | ||||||||||||||||||||||||||||
| 264 | { | ||||||||||||||||||||||||||||
| 265 | 2 | ▶ | my($self, $regex, $message) = @_; | ||||||||||||||||||||||||||
|
Subroutine
code_like: called CC=4 SCAR=14.2
Pod
documented
| |||||||||||||||||||||||||||||
| 266 | |||||||||||||||||||||||||||||
| 267 | 2 | ▶ | $message //= "response code matches"; | ||||||||||||||||||||||||||
|
Condition50%1/2
$message //= "response code matches"
MC/DC0%0/1
$message //= "response code matches"
$message
Truth table50%1/2
A
A= $message
| |||||||||||||||||||||||||||||
| 268 | |||||||||||||||||||||||||||||
| 269 | 2 | my $ctx = context(); | |||||||||||||||||||||||||||
| 270 | 2 | ▶ | my $actual = eval { $self->res->code } // 'undefined'; | ||||||||||||||||||||||||||
|
Condition50%1/2
eval {
do {
$self->res->code
}
} // "undefined"
MC/DC0%0/1
eval {
do {
$self->res->code
}
} // "undefined"
eval {
do {
$self->res->code
}
}
Truth table50%1/2
A
A= eval {
do {
$self->res->code
}
}
| |||||||||||||||||||||||||||||
| 271 | 2 | $ctx->ok($actual =~ $regex, $message); | |||||||||||||||||||||||||||
| 272 | 2 | ▶ | $ctx->diag("code $actual does not match $regex") | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 273 | unless $actual =~ $regex; | ||||||||||||||||||||||||||||
| 274 | 2 | $ctx->release; | |||||||||||||||||||||||||||
| 275 | |||||||||||||||||||||||||||||
| 276 | 2 | $self; | |||||||||||||||||||||||||||
| 277 | } | ||||||||||||||||||||||||||||
| 278 | |||||||||||||||||||||||||||||
| 279 | |||||||||||||||||||||||||||||
| 280 | sub message_like | ||||||||||||||||||||||||||||
| 281 | { | ||||||||||||||||||||||||||||
| 282 | 80 | ▶ | my($self, $regex, $message) = @_; | ||||||||||||||||||||||||||
|
Subroutine
message_like: called CC=7 SCAR=20.5
Pod
documented
| |||||||||||||||||||||||||||||
| 283 | |||||||||||||||||||||||||||||
| 284 | 80 | ▶ | $message //= "response message matches"; | ||||||||||||||||||||||||||
|
Condition50%1/2
$message //= "response message matches"
MC/DC0%0/1
$message //= "response message matches"
$message
Truth table50%1/2
A
A= $message
| |||||||||||||||||||||||||||||
| 285 | |||||||||||||||||||||||||||||
| 286 | 80 | my $ok = 0; | |||||||||||||||||||||||||||
| 287 | |||||||||||||||||||||||||||||
| 288 | 80 | ▶ | my @message = @{ (eval { $self->res->message }) // [] }; | ||||||||||||||||||||||||||
|
Condition50%1/2
eval {
do {
$self->res->message
}
} // []
MC/DC0%0/1
eval {
do {
$self->res->message
}
} // []
eval {
do {
$self->res->message
}
}
Truth table50%1/2
A
A= eval {
do {
$self->res->message
}
}
| |||||||||||||||||||||||||||||
| 289 | 80 | foreach my $line (@message) | |||||||||||||||||||||||||||
| 290 | { | ||||||||||||||||||||||||||||
| 291 | 82 | ▶ | $ok = 1 if $line =~ $regex; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 292 | } | ||||||||||||||||||||||||||||
| 293 | |||||||||||||||||||||||||||||
| 294 | 80 | my $ctx = context(); | |||||||||||||||||||||||||||
| 295 | 80 | $ctx->ok($ok, $message); | |||||||||||||||||||||||||||
| 296 | 80 | ▶ | unless($ok) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 297 | { | ||||||||||||||||||||||||||||
| 298 | 0 | $ctx->diag("message: "); | |||||||||||||||||||||||||||
| 299 | 0 | $ctx->diag(" $_") for @message; | |||||||||||||||||||||||||||
| 300 | 0 | $ctx->diag("does not match $regex"); | |||||||||||||||||||||||||||
| 301 | } | ||||||||||||||||||||||||||||
| 302 | 80 | $ctx->release; | |||||||||||||||||||||||||||
| 303 | |||||||||||||||||||||||||||||
| 304 | 80 | $self; | |||||||||||||||||||||||||||
| 305 | } | ||||||||||||||||||||||||||||
| 306 | |||||||||||||||||||||||||||||
| 307 | |||||||||||||||||||||||||||||
| 308 | sub message_is | ||||||||||||||||||||||||||||
| 309 | { | ||||||||||||||||||||||||||||
| 310 | 23 | ▶ | my($self, $string, $message) = @_; | ||||||||||||||||||||||||||
|
Subroutine
message_is: called CC=7 SCAR=21.1
Pod
documented
| |||||||||||||||||||||||||||||
| 311 | |||||||||||||||||||||||||||||
| 312 | 23 | ▶ | $message //= "response message matches"; | ||||||||||||||||||||||||||
|
Condition50%1/2
$message //= "response message matches"
MC/DC0%0/1
$message //= "response message matches"
$message
Truth table50%1/2
A
A= $message
| |||||||||||||||||||||||||||||
| 313 | |||||||||||||||||||||||||||||
| 314 | 23 | my $ok = 0; | |||||||||||||||||||||||||||
| 315 | |||||||||||||||||||||||||||||
| 316 | 23 | ▶ | my @message = @{ (eval { $self->res->message }) // [] }; | ||||||||||||||||||||||||||
|
Condition50%1/2
eval {
do {
$self->res->message
}
} // []
MC/DC0%0/1
eval {
do {
$self->res->message
}
} // []
eval {
do {
$self->res->message
}
}
Truth table50%1/2
A
A= eval {
do {
$self->res->message
}
}
| |||||||||||||||||||||||||||||
| 317 | |||||||||||||||||||||||||||||
| 318 | 23 | foreach my $line (@message) | |||||||||||||||||||||||||||
| 319 | { | ||||||||||||||||||||||||||||
| 320 | 23 | ▶ | $ok = 1 if $line eq $string; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 321 | } | ||||||||||||||||||||||||||||
| 322 | |||||||||||||||||||||||||||||
| 323 | 23 | my $ctx = context(); | |||||||||||||||||||||||||||
| 324 | 23 | $ctx->ok($ok, $message); | |||||||||||||||||||||||||||
| 325 | 23 | ▶ | unless($ok) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 326 | { | ||||||||||||||||||||||||||||
| 327 | 0 | $ctx->diag("message: "); | |||||||||||||||||||||||||||
| 328 | 0 | $ctx->diag(" $_") for @message; | |||||||||||||||||||||||||||
| 329 | 0 | $ctx->diag("does not match $string"); | |||||||||||||||||||||||||||
| 330 | } | ||||||||||||||||||||||||||||
| 331 | 23 | $ctx->release; | |||||||||||||||||||||||||||
| 332 | |||||||||||||||||||||||||||||
| 333 | 23 | $self; | |||||||||||||||||||||||||||
| 334 | } | ||||||||||||||||||||||||||||
| 335 | |||||||||||||||||||||||||||||
| 336 | |||||||||||||||||||||||||||||
| 337 | sub list_ok | ||||||||||||||||||||||||||||
| 338 | { | ||||||||||||||||||||||||||||
| 339 | 0 | ▶ | my($self, $location, $message) = @_; | ||||||||||||||||||||||||||
|
Subroutine
list_ok: not called CC=6 SCAR=37.4
Pod
documented
| |||||||||||||||||||||||||||||
| 340 | |||||||||||||||||||||||||||||
| 341 | 0 | ▶ | $message //= defined $location ? "list: $location" : 'list'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$message //= defined $location ? "list: $location" : "list"
MC/DC0%0/2
$message //= defined $location ? "list: $location" : "list"
$message
defined $location ? "list: $location" : "list"
Truth table0%0/3
A //= B
A= $messageB= defined $location ? "list: $location" : "list"
| |||||||||||||||||||||||||||||
| 342 | |||||||||||||||||||||||||||||
| 343 | 0 | my $client = eval { $self->_client }; | |||||||||||||||||||||||||||
| 344 | 0 | my $error = $@; | |||||||||||||||||||||||||||
| 345 | |||||||||||||||||||||||||||||
| 346 | 0 | $self->content(''); | |||||||||||||||||||||||||||
| 347 | |||||||||||||||||||||||||||||
| 348 | 0 | ▶ | unless($error) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 349 | { | ||||||||||||||||||||||||||||
| 350 | 0 | my $list = eval { $client->list($location)->recv }; | |||||||||||||||||||||||||||
| 351 | 0 | $error = $@; | |||||||||||||||||||||||||||
| 352 | 0 | ▶ | $self->content(join "\n", @$list, '') unless $error; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 353 | } | ||||||||||||||||||||||||||||
| 354 | |||||||||||||||||||||||||||||
| 355 | 0 | my $ctx = context(); | |||||||||||||||||||||||||||
| 356 | 0 | $ctx->ok($error eq '', $message); | |||||||||||||||||||||||||||
| 357 | 0 | ▶ | $ctx->diag($error) if $error; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 358 | 0 | $ctx->release; | |||||||||||||||||||||||||||
| 359 | |||||||||||||||||||||||||||||
| 360 | 0 | $self; | |||||||||||||||||||||||||||
| 361 | } | ||||||||||||||||||||||||||||
| 362 | |||||||||||||||||||||||||||||
| 363 | |||||||||||||||||||||||||||||
| 364 | sub nlst_ok | ||||||||||||||||||||||||||||
| 365 | { | ||||||||||||||||||||||||||||
| 366 | 6 | ▶ | my($self, $location, $message) = @_; | ||||||||||||||||||||||||||
|
Subroutine
nlst_ok: called CC=6 SCAR=18.3
Pod
documented
| |||||||||||||||||||||||||||||
| 367 | |||||||||||||||||||||||||||||
| 368 | 6 | ▶ | $message //= defined $location ? "nlst: $location" : 'nlst'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$message //= defined $location ? "nlst: $location" : "nlst"
MC/DC0%0/2
$message //= defined $location ? "nlst: $location" : "nlst"
$message
defined $location ? "nlst: $location" : "nlst"
Truth table33%1/3
A //= B
A= $messageB= defined $location ? "nlst: $location" : "nlst"
| |||||||||||||||||||||||||||||
| 369 | |||||||||||||||||||||||||||||
| 370 | 6 | my $client = eval { $self->_client }; | |||||||||||||||||||||||||||
| 371 | 6 | my $error = $@; | |||||||||||||||||||||||||||
| 372 | |||||||||||||||||||||||||||||
| 373 | 6 | $self->content(''); | |||||||||||||||||||||||||||
| 374 | |||||||||||||||||||||||||||||
| 375 | 6 | ▶ | unless($error) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 376 | { | ||||||||||||||||||||||||||||
| 377 | 6 | my $list = eval { $client->nlst($location)->recv }; | |||||||||||||||||||||||||||
| 378 | 6 | $error = $@; | |||||||||||||||||||||||||||
| 379 | 6 | ▶ | $self->content(join "\n", @$list, '') unless $error; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 380 | } | ||||||||||||||||||||||||||||
| 381 | |||||||||||||||||||||||||||||
| 382 | 6 | my $ctx = context(); | |||||||||||||||||||||||||||
| 383 | 6 | $ctx->ok($error eq '', $message); | |||||||||||||||||||||||||||
| 384 | 6 | ▶ | $ctx->diag($error) if $error; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 385 | 6 | $ctx->release; | |||||||||||||||||||||||||||
| 386 | |||||||||||||||||||||||||||||
| 387 | 6 | $self; | |||||||||||||||||||||||||||
| 388 | } | ||||||||||||||||||||||||||||
| 389 | |||||||||||||||||||||||||||||
| 390 | |||||||||||||||||||||||||||||
| 391 | sub _display_content | ||||||||||||||||||||||||||||
| 392 | { | ||||||||||||||||||||||||||||
| 393 | 6 | ▶ | state $temp; | ||||||||||||||||||||||||||
|
Subroutine
_display_content: called CC=6 SCAR=19.7
| |||||||||||||||||||||||||||||
| 394 | 6 | state $counter = 0; | |||||||||||||||||||||||||||
| 395 | 6 | my $method = 'diag'; | |||||||||||||||||||||||||||
| 396 | #$method = 'note' if $tb->todo; | ||||||||||||||||||||||||||||
| 397 | |||||||||||||||||||||||||||||
| 398 | 6 | ▶ | unless(defined $temp) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 399 | { | ||||||||||||||||||||||||||||
| 400 | 2 | $temp = tempdir(CLEANUP => 1); | |||||||||||||||||||||||||||
| 401 | } | ||||||||||||||||||||||||||||
| 402 | |||||||||||||||||||||||||||||
| 403 | 6 | my $file = $temp->file(sprintf("data.%d", $counter++)); | |||||||||||||||||||||||||||
| 404 | 6 | $file->spew($_[0]); | |||||||||||||||||||||||||||
| 405 | |||||||||||||||||||||||||||||
| 406 | 6 | my $ctx = context(); | |||||||||||||||||||||||||||
| 407 | |||||||||||||||||||||||||||||
| 408 | 6 | ▶ | if(-T $file) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 409 | { | ||||||||||||||||||||||||||||
| 410 | 6 | $ctx->$method(" $_") for split /\n/, $_[0]; | |||||||||||||||||||||||||||
| 411 | } | ||||||||||||||||||||||||||||
| 412 | else | ||||||||||||||||||||||||||||
| 413 | { | ||||||||||||||||||||||||||||
| 414 | 0 | ▶ | if(eval { require Data::HexDump }) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 415 | { | ||||||||||||||||||||||||||||
| 416 | 0 | $ctx->$method(" $_") for grep !/^$/, split /\n/, Data::HexDump::HexDump($_[0]); | |||||||||||||||||||||||||||
| 417 | } | ||||||||||||||||||||||||||||
| 418 | else | ||||||||||||||||||||||||||||
| 419 | { | ||||||||||||||||||||||||||||
| 420 | 0 | $ctx->$method(" binary content"); | |||||||||||||||||||||||||||
| 421 | } | ||||||||||||||||||||||||||||
| 422 | } | ||||||||||||||||||||||||||||
| 423 | |||||||||||||||||||||||||||||
| 424 | 6 | $ctx->release; | |||||||||||||||||||||||||||
| 425 | |||||||||||||||||||||||||||||
| 426 | 6 | $file->remove; | |||||||||||||||||||||||||||
| 427 | } | ||||||||||||||||||||||||||||
| 428 | |||||||||||||||||||||||||||||
| 429 | sub content_is | ||||||||||||||||||||||||||||
| 430 | { | ||||||||||||||||||||||||||||
| 431 | 9 | ▶ | my($self, $string, $message) = @_; | ||||||||||||||||||||||||||
|
Subroutine
content_is: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||
| 432 | |||||||||||||||||||||||||||||
| 433 | 9 | ▶ | $message ||= 'content matches'; | ||||||||||||||||||||||||||
|
Condition50%1/2
$message ||= "content matches"
MC/DC0%0/1
$message ||= "content matches"
$message
Truth table50%1/2
A
A= $message
| |||||||||||||||||||||||||||||
| 434 | |||||||||||||||||||||||||||||
| 435 | 9 | my $ok = $self->content eq $string; | |||||||||||||||||||||||||||
| 436 | |||||||||||||||||||||||||||||
| 437 | 9 | my $ctx = context(); | |||||||||||||||||||||||||||
| 438 | 9 | $ctx->ok($ok, $message); | |||||||||||||||||||||||||||
| 439 | 9 | ▶ | unless($ok) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 440 | { | ||||||||||||||||||||||||||||
| 441 | 3 | $ctx->diag("content:"); | |||||||||||||||||||||||||||
| 442 | 3 | _display_content($self->content); | |||||||||||||||||||||||||||
| 443 | 3 | $ctx->diag("expected:"); | |||||||||||||||||||||||||||
| 444 | 3 | _display_content($string); | |||||||||||||||||||||||||||
| 445 | } | ||||||||||||||||||||||||||||
| 446 | |||||||||||||||||||||||||||||
| 447 | 9 | $ctx->release; | |||||||||||||||||||||||||||
| 448 | |||||||||||||||||||||||||||||
| 449 | 9 | $self; | |||||||||||||||||||||||||||
| 450 | } | ||||||||||||||||||||||||||||
| 451 | |||||||||||||||||||||||||||||
| 452 | |||||||||||||||||||||||||||||
| 453 | sub global_timeout_ok (;$$) | ||||||||||||||||||||||||||||
| 454 | { | ||||||||||||||||||||||||||||
| 455 | 4 | ▶ | my($timeout, $message) = @_; | ||||||||||||||||||||||||||
|
Subroutine
global_timeout_ok: called CC=4 SCAR=14.1
Pod
documented
| |||||||||||||||||||||||||||||
| 456 | |||||||||||||||||||||||||||||
| 457 | 4 | ▶ | $timeout //= 120; | ||||||||||||||||||||||||||
|
Condition100%2/2
$timeout //= 120
MC/DC100%1/1
$timeout //= 120
$timeout
Truth table100%2/2
A
A= $timeout
| |||||||||||||||||||||||||||||
| 458 | 4 | ▶ | $message //= "global timeout of $timeout seconds"; | ||||||||||||||||||||||||||
|
Condition50%1/2
$message //= "global timeout of $timeout seconds"
MC/DC0%0/1
$message //= "global timeout of $timeout seconds"
$message
Truth table50%1/2
A
A= $message
| |||||||||||||||||||||||||||||
| 459 | |||||||||||||||||||||||||||||
| 460 | 4 | my $ctx = context(); | |||||||||||||||||||||||||||
| 461 | |||||||||||||||||||||||||||||
| 462 | 4 | state $timers = []; | |||||||||||||||||||||||||||
| 463 | |||||||||||||||||||||||||||||
| 464 | 4 | eval { | |||||||||||||||||||||||||||
| 465 | push @$timers, AnyEvent->timer( | ||||||||||||||||||||||||||||
| 466 | after => $timeout, | ||||||||||||||||||||||||||||
| 467 | 0 | ▶ | cb => sub { $ctx->diag("GLOBAL TIMEOUT"); exit }, | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 468 | 4 | ); | |||||||||||||||||||||||||||
| 469 | }; | ||||||||||||||||||||||||||||
| 470 | 4 | my $error = $@; | |||||||||||||||||||||||||||
| 471 | |||||||||||||||||||||||||||||
| 472 | 4 | my $ok = $error eq ''; | |||||||||||||||||||||||||||
| 473 | |||||||||||||||||||||||||||||
| 474 | 4 | $ctx->ok($ok, $message); | |||||||||||||||||||||||||||
| 475 | 4 | ▶ | $ctx->diag($error) if $error; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 476 | |||||||||||||||||||||||||||||
| 477 | 4 | $ctx->release; | |||||||||||||||||||||||||||
| 478 | |||||||||||||||||||||||||||||
| 479 | 4 | $ok; | |||||||||||||||||||||||||||
| 480 | } | ||||||||||||||||||||||||||||
| 481 | |||||||||||||||||||||||||||||
| 482 | sub import | ||||||||||||||||||||||||||||
| 483 | { | ||||||||||||||||||||||||||||
| 484 | 21 | ▶ | my $caller = caller; | ||||||||||||||||||||||||||
|
Subroutine
import: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 485 | 22 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 486 | 21 | *{join '::', $caller, 'create_ftpserver_ok'} = \&create_ftpserver_ok; | |||||||||||||||||||||||||||
| 487 | 21 | *{join '::', $caller, 'global_timeout_ok'} = \&global_timeout_ok; | |||||||||||||||||||||||||||
| 488 | } | ||||||||||||||||||||||||||||
| 489 | |||||||||||||||||||||||||||||
| 490 | 22 | ▶ | BEGIN { eval 'use EV' } | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 491 | |||||||||||||||||||||||||||||
| 492 | 22 | 1; | |||||||||||||||||||||||||||
| 493 | |||||||||||||||||||||||||||||
| 494 | __END__ | ||||||||||||||||||||||||||||