File Coverage

blib/lib/UV/TCP.pm
Criterion Covered Total %
statement 15 20 75.0
branch 0 6 0.0
condition 0 3 0.0
subroutine 5 6 83.3
pod 2 2 100.0
total 22 37 59.4


line stmt bran cond sub pod time code
1             package UV::TCP;
2              
3             our $VERSION = '1.902';
4              
5 4     4   1852 use strict;
  4         13  
  4         118  
6 4     4   20 use warnings;
  4         6  
  4         90  
7 4     4   18 use Carp ();
  4         6  
  4         63  
8 4     4   1885 use parent 'UV::Stream';
  4         1222  
  4         21  
9              
10             sub open
11             {
12 2     2 1 678 my $self = shift;
13 2         5 my ($fh) = @_;
14 2         12 return $self->_open($fh->fileno);
15             }
16              
17             sub close_reset {
18 0     0 1   my $self = shift;
19 0 0         $self->on('close', @_) if @_;
20              
21 0 0 0       return if $self->closed || $self->closing;
22 0 0         $self->stop if $self->can('stop');
23 0           $self->_close_reset;
24             }
25              
26             1;
27              
28             __END__