| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  |  | 
| 2 |  |  |  |  |  |  | package Apache2::ASP::Mock::ClientSocket; | 
| 3 |  |  |  |  |  |  |  | 
| 4 | 23 |  |  | 23 |  | 87 | use strict; | 
|  | 23 |  |  |  |  | 29 |  | 
|  | 23 |  |  |  |  | 625 |  | 
| 5 | 23 |  |  | 23 |  | 85 | use warnings 'all'; | 
|  | 23 |  |  |  |  | 53 |  | 
|  | 23 |  |  |  |  | 660 |  | 
| 6 | 23 |  |  | 23 |  | 92 | use Scalar::Util 'weaken'; | 
|  | 23 |  |  |  |  | 28 |  | 
|  | 23 |  |  |  |  | 3197 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | #============================================================================== | 
| 10 |  |  |  |  |  |  | sub new | 
| 11 |  |  |  |  |  |  | { | 
| 12 | 0 |  |  | 0 | 0 |  | my ($class, %args) = @_; | 
| 13 |  |  |  |  |  |  |  | 
| 14 | 0 |  |  |  |  |  | my $s = bless \%args, $class; | 
| 15 |  |  |  |  |  |  |  | 
| 16 | 0 |  |  |  |  |  | weaken($s->{connection}); | 
| 17 | 0 |  |  |  |  |  | return $s; | 
| 18 |  |  |  |  |  |  | }# end new() | 
| 19 |  |  |  |  |  |  |  | 
| 20 |  |  |  |  |  |  |  | 
| 21 |  |  |  |  |  |  | #============================================================================== | 
| 22 |  |  |  |  |  |  | sub close | 
| 23 |  |  |  |  |  |  | { | 
| 24 | 0 |  |  | 0 | 1 |  | my $s = shift; | 
| 25 |  |  |  |  |  |  |  | 
| 26 | 0 |  |  |  |  |  | $s->{connection}->aborted( 1 ); | 
| 27 |  |  |  |  |  |  | }# end close() | 
| 28 |  |  |  |  |  |  |  | 
| 29 |  |  |  |  |  |  | 1;# return true: | 
| 30 |  |  |  |  |  |  |  | 
| 31 |  |  |  |  |  |  | =pod | 
| 32 |  |  |  |  |  |  |  | 
| 33 |  |  |  |  |  |  | =head1 NAME | 
| 34 |  |  |  |  |  |  |  | 
| 35 |  |  |  |  |  |  | Apache2::ASP::Mock::ClientSocket - Mimics the APR::Socket object | 
| 36 |  |  |  |  |  |  |  | 
| 37 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 38 |  |  |  |  |  |  |  | 
| 39 |  |  |  |  |  |  | my $socket = $Response->context->connection->client_socket; | 
| 40 |  |  |  |  |  |  | $socket->close(); | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 43 |  |  |  |  |  |  |  | 
| 44 |  |  |  |  |  |  | This package mimics the L object in a normal mod_perl2 environment, | 
| 45 |  |  |  |  |  |  | and is used by L. | 
| 46 |  |  |  |  |  |  |  | 
| 47 |  |  |  |  |  |  | =head1 PUBLIC METHODS | 
| 48 |  |  |  |  |  |  |  | 
| 49 |  |  |  |  |  |  | =head2 close( ) | 
| 50 |  |  |  |  |  |  |  | 
| 51 |  |  |  |  |  |  | Pretends to close the current connection. | 
| 52 |  |  |  |  |  |  |  | 
| 53 |  |  |  |  |  |  | =head1 BUGS | 
| 54 |  |  |  |  |  |  |  | 
| 55 |  |  |  |  |  |  | It's possible that some bugs have found their way into this release. | 
| 56 |  |  |  |  |  |  |  | 
| 57 |  |  |  |  |  |  | Use RT L to submit bug reports. | 
| 58 |  |  |  |  |  |  |  | 
| 59 |  |  |  |  |  |  | =head1 HOMEPAGE | 
| 60 |  |  |  |  |  |  |  | 
| 61 |  |  |  |  |  |  | Please visit the Apache2::ASP homepage at L to see examples | 
| 62 |  |  |  |  |  |  | of Apache2::ASP in action. | 
| 63 |  |  |  |  |  |  |  | 
| 64 |  |  |  |  |  |  | =head1 AUTHOR | 
| 65 |  |  |  |  |  |  |  | 
| 66 |  |  |  |  |  |  | John Drago | 
| 67 |  |  |  |  |  |  |  | 
| 68 |  |  |  |  |  |  | =head1 COPYRIGHT | 
| 69 |  |  |  |  |  |  |  | 
| 70 |  |  |  |  |  |  | Copyright 2008 John Drago.  All rights reserved. | 
| 71 |  |  |  |  |  |  |  | 
| 72 |  |  |  |  |  |  | =head1 LICENSE | 
| 73 |  |  |  |  |  |  |  | 
| 74 |  |  |  |  |  |  | This software is Free software and is licensed under the same terms as perl itself. | 
| 75 |  |  |  |  |  |  |  | 
| 76 |  |  |  |  |  |  | =cut | 
| 77 |  |  |  |  |  |  |  | 
| 78 |  |  |  |  |  |  |  |