blib/lib/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
« blib/lib/ASP4/OutBuffer.pm ↑ Summary blib/lib/ASP4/Mock/Pool.pm »
1  
2 package ASP4::Mock::ClientSocket;
3  
4 15 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 15 ▶use warnings 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 5145 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
8 return bless {
9 0 ▶ on_close => sub { },
Subroutine __ANON__: not called CC=1 SCAR=0.0
10 5145 }, shift;
11 }
12  
13 5145 ▶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 15 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 =head1 BUGS
39  
40 It's possible that some bugs have found their way into this release.
41  
42 Use RT L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=ASP4> to submit bug reports.
43  
44 =head1 HOMEPAGE
45  
46 Please visit the ASP4 homepage at L<http://0x31337.org/code/> to see examples
47 of ASP4 in action.
48  
49 =cut
50  
« blib/lib/ASP4/OutBuffer.pm ↑ Summary blib/lib/ASP4/Mock/Pool.pm »