File Coverage

blib/lib/Socket/GetAddrInfo/Core.pm
Criterion Covered Total %
statement 10 10 100.0
branch 2 2 100.0
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1             # You may distribute under the terms of either the GNU General Public License
2             # or the Artistic License (the same terms as Perl itself)
3             #
4             # (C) Paul Evans, 2011 -- leonerd@leonerd.org.uk
5              
6             package Socket::GetAddrInfo::Core;
7              
8 6     6   33 use strict;
  6         10  
  6         275  
9 6     6   30 use warnings;
  6         13  
  6         353  
10              
11             our $VERSION = '0.22';
12              
13             # Load the actual code into Socket::GetAddrInfo
14             package # hide from indexer
15             Socket::GetAddrInfo;
16              
17 6 100   6   173 BEGIN { die '$Socket::GetAddrInfo::NO_CORE is set' if our $NO_CORE }
18              
19 5     5   5048 use Socket 1.93;
  5         23846  
  5         3919  
20             defined &Socket::NIx_NOHOST or die "Core Socket is missing NIx_NOHOST";
21              
22             our @EXPORT_OK = qw(
23             getaddrinfo
24             getnameinfo
25             );
26              
27             push @EXPORT_OK, grep { m/^AI_|^NI(?:x)?_|^EAI_/ } @Socket::EXPORT_OK;
28              
29             Socket->import( @EXPORT_OK );
30              
31             0x55AA;