line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Apache::GopherHandler::TiedSocket; |
3
|
2
|
|
|
2
|
|
57435
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
76
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
174
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub TIEHANDLE |
8
|
|
|
|
|
|
|
{ |
9
|
1
|
|
|
1
|
|
20
|
my ($class, $socket) = @_; |
10
|
1
|
|
|
|
|
5
|
bless [ $socket ], $class; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub PRINT |
14
|
|
|
|
|
|
|
{ |
15
|
1
|
|
|
1
|
|
9
|
my ($self, @to_print) = @_; |
16
|
1
|
|
|
|
|
6
|
my $socket = $self->[0]; |
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
2
|
|
3095
|
use bytes; # Need byte length, not char length |
|
2
|
|
|
|
|
62
|
|
|
2
|
|
|
|
|
10
|
|
19
|
1
|
|
|
|
|
4
|
my $to_print = join('', @to_print); |
20
|
1
|
|
|
|
|
5
|
$socket->send( $to_print, length $to_print ); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub READ |
24
|
|
|
|
|
|
|
{ |
25
|
1
|
|
|
1
|
|
392
|
my ($self, $buf, $len) = @_; |
26
|
1
|
|
|
|
|
6
|
$self->[0]->recv( $buf, $len ); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
__END__ |