File Coverage

blib/lib/IO/Stream/MatrixSSL/const.pm
Criterion Covered Total %
statement 32 32 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod n/a
total 42 42 100.0


line stmt bran cond sub pod time code
1             package IO::Stream::MatrixSSL::const;
2 9     9   5613 use 5.010001;
  9         45  
3 9     9   40 use warnings;
  9         14  
  9         225  
4 9     9   36 use strict;
  9         16  
  9         177  
5 9     9   1953 use utf8;
  9         66  
  9         52  
6 9     9   207 use Carp;
  9         14  
  9         689  
7              
8             our $VERSION = 'v2.0.2';
9              
10             # Timeouts:
11 9     9   49 use constant TOHANDSHAKE => 30;
  9         15  
  9         635  
12              
13             # Custom errors:
14 9     9   47 use constant ETOHANDSHAKE => 'ssl handshake timeout';
  9         13  
  9         385  
15 9     9   42 use constant CERTVALIDATOR_INTERNAL_ERROR => -1;
  9         15  
  9         493  
16              
17              
18             sub import {
19 31     31   99 my $pkg = caller;
20 9     9   52 no strict 'refs';
  9         15  
  9         687  
21 31         235 for my $const (qw( TOHANDSHAKE ETOHANDSHAKE CERTVALIDATOR_INTERNAL_ERROR )) {
22 93         113 *{"${pkg}::$const"} = \&{$const};
  93         355  
  93         167  
23             }
24 31         706 return;
25             }
26              
27              
28             1;