line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBD::Gofer::Transport::null; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# $Id: null.pm 10087 2007-10-16 12:42:37Z Tim $ |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Copyright (c) 2007, Tim Bunce, Ireland |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# You may distribute under the terms of either the GNU General Public |
8
|
|
|
|
|
|
|
# License or the Artistic License, as specified in the Perl README file. |
9
|
|
|
|
|
|
|
|
10
|
56
|
|
|
56
|
|
316
|
use strict; |
|
56
|
|
|
|
|
113
|
|
|
56
|
|
|
|
|
1424
|
|
11
|
56
|
|
|
56
|
|
275
|
use warnings; |
|
56
|
|
|
|
|
106
|
|
|
56
|
|
|
|
|
1484
|
|
12
|
|
|
|
|
|
|
|
13
|
56
|
|
|
56
|
|
261
|
use base qw(DBD::Gofer::Transport::Base); |
|
56
|
|
|
|
|
97
|
|
|
56
|
|
|
|
|
16274
|
|
14
|
|
|
|
|
|
|
|
15
|
56
|
|
|
56
|
|
20720
|
use DBI::Gofer::Execute; |
|
56
|
|
|
|
|
176
|
|
|
56
|
|
|
|
|
8570
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = "0.010088"; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw( |
20
|
|
|
|
|
|
|
pending_response |
21
|
|
|
|
|
|
|
transmit_count |
22
|
|
|
|
|
|
|
)); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
my $executor = DBI::Gofer::Execute->new(); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub transmit_request_by_transport { |
28
|
6454
|
|
|
6454
|
0
|
11215
|
my ($self, $request) = @_; |
29
|
6454
|
|
100
|
|
|
13676
|
$self->transmit_count( ($self->transmit_count()||0) + 1 ); # just for tests |
30
|
|
|
|
|
|
|
|
31
|
6454
|
|
|
|
|
16203
|
my $frozen_request = $self->freeze_request($request); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# ... |
34
|
|
|
|
|
|
|
# the request is magically transported over to ... ourselves |
35
|
|
|
|
|
|
|
# ... |
36
|
|
|
|
|
|
|
|
37
|
6454
|
|
|
|
|
15199
|
my $response = $executor->execute_request( $self->thaw_request($frozen_request, undef, 1) ); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
# put response 'on the shelf' ready for receive_response() |
40
|
6454
|
|
|
|
|
43413
|
$self->pending_response( $response ); |
41
|
|
|
|
|
|
|
|
42
|
6454
|
|
|
|
|
66493
|
return undef; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub receive_response_by_transport { |
47
|
6457
|
|
|
6457
|
0
|
9053
|
my $self = shift; |
48
|
|
|
|
|
|
|
|
49
|
6457
|
|
|
|
|
12355
|
my $response = $self->pending_response; |
50
|
|
|
|
|
|
|
|
51
|
6457
|
|
|
|
|
16013
|
my $frozen_response = $self->freeze_response($response, undef, 1); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
# ... |
54
|
|
|
|
|
|
|
# the response is magically transported back to ... ourselves |
55
|
|
|
|
|
|
|
# ... |
56
|
|
|
|
|
|
|
|
57
|
6457
|
|
|
|
|
14839
|
return $self->thaw_response($frozen_response); |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
__END__ |