line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# No-op plugin example based on Data::Alias. |
2
|
|
|
|
|
|
|
package IO::Stream::NoopAlias; |
3
|
1
|
|
|
1
|
|
2458
|
use 5.010001; |
|
1
|
|
|
|
|
3
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
18
|
|
5
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
6
|
1
|
|
|
1
|
|
5
|
use utf8; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
7
|
1
|
|
|
1
|
|
26
|
use Carp; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
67
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = 'v2.0.3'; |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
5
|
use Data::Alias 0.08; |
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
249
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
2
|
|
|
2
|
0
|
1166
|
my ($class) = @_; |
15
|
2
|
|
|
|
|
4
|
my $self = bless {}, $class; |
16
|
2
|
|
|
|
|
13
|
return $self; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub PREPARE { |
20
|
2
|
|
|
2
|
0
|
4
|
my ($self, $fh, $host, $port) = @_; |
21
|
2
|
|
|
|
|
5
|
for (qw( out_buf out_pos out_bytes in_buf in_bytes ip is_eof )) { |
22
|
14
|
|
|
|
|
27
|
alias $self->{$_} = $self->{_master}->{$_}; |
23
|
|
|
|
|
|
|
} |
24
|
2
|
|
|
|
|
10
|
$self->{_slave}->PREPARE($fh, $host, $port); |
25
|
2
|
|
|
|
|
3
|
return; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub WRITE { |
29
|
2
|
|
|
2
|
|
793
|
my ($self) = @_; |
30
|
2
|
|
|
|
|
7
|
$self->{_slave}->WRITE(); |
31
|
2
|
|
|
|
|
3
|
return; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub EVENT { |
35
|
8
|
|
|
8
|
0
|
3795
|
my ($self, $e, $err) = @_; |
36
|
8
|
|
|
|
|
23
|
$self->{_master}->EVENT($e, $err); |
37
|
8
|
|
|
|
|
12
|
return; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |