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.900';
4              
5 4     4   1917 use strict;
  4         13  
  4         121  
6 4     4   19 use warnings;
  4         8  
  4         92  
7 4     4   19 use Carp ();
  4         7  
  4         62  
8 4     4   1888 use parent 'UV::Stream';
  4         1238  
  4         19  
9              
10             sub open
11             {
12 2     2 1 733 my $self = shift;
13 2         5 my ($fh) = @_;
14 2         11 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__