File Coverage

blib/lib/IO.pm
Criterion Covered Total %
statement 19 19 100.0
branch 8 8 100.0
condition n/a
subroutine 5 5 100.0
pod n/a
total 32 32 100.0


line stmt bran cond sub pod time code
1             #
2              
3             package IO;
4              
5 37     37   243543 use XSLoader ();
  37         97  
  37         1279  
6 37     37   273 use Carp;
  37         69  
  37         2787  
7 37     37   266 use strict;
  37         149  
  37         1175  
8 37     37   177 use warnings;
  37         97  
  37         14405  
9              
10             our $VERSION = "1.55";
11             XSLoader::load 'IO', $VERSION;
12              
13             sub import {
14 7     7   1467 shift;
15              
16 7 100       865 warnings::warnif('deprecated', qq{Parameterless "use IO" deprecated})
17             if @_ == 0 ;
18            
19 7 100       63 my @l = @_ ? @_ : qw(Handle Seekable File Pipe Socket Dir);
20              
21 7         37 local @INC = @INC;
22 7 100       29 pop @INC if $INC[-1] eq '.';
23 7 100       20 eval join("", map { "require IO::" . (/(\w+)/)[0] . ";\n" } @l)
  32         718  
24             or croak $@;
25             }
26              
27             1;
28              
29             __END__