ASP4/Mock/ClientSocket.pm

filter: Statementstmt 90.9% 10 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 33.3% 1 / 3 totaltotal 75.0% 15 / 20 CC 1 SCAR 1.5
CC
1
Cov
91%
close
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« ASP4/Mock/Pool.pm ↑ Summary ASP4/PageLoader.pm »
1  
2 package ASP4::Mock::ClientSocket;
3  
4 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 8 ▶use warnings 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 sub new {
8 return bless {
9 ▶ on_close => sub { },
Subroutine __ANON__: not called CC=1 SCAR=0.0
10 1 ▶ }, shift;
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
11 }
12  
13 1 ▶sub on_close { my $s = shift; $s->{on_close} = shift }
Subroutine on_close: called CC=1 SCAR=0.0
Pod undocumented
14 0 ▶sub close { shift->{on_close}->( ) }
Subroutine close: not called CC=1 SCAR=6.9
Pod documented
15  
16 8 1;# return true:
17  
18 =pod
19  
20 =head1 NAME
21  
22 ASP4::Mock::ClientSocket - Mimics APR::Socket object
23  
24 =head1 SYNOPSIS
25  
26 my $socket = $r->connection->client_socket
27  
28 =head1 DESCRIPTION
29  
30 Mimics (minimally) the L<APR::Socket> object.
31  
32 =head1 PUBLIC METHODS
33  
34 =head2 close( )
35  
36 Internal use only.
37  
38 =cut
39  
« ASP4/Mock/Pool.pm ↑ Summary ASP4/PageLoader.pm »