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 34     34   6599 use XSLoader ();
  34         55  
  34         786  
6 34     34   130 use Carp;
  34         46  
  34         1382  
7 34     34   157 use strict;
  34         51  
  34         736  
8 34     34   158 use warnings;
  34         62  
  34         6634  
9              
10             our $VERSION = "1.51";
11             XSLoader::load 'IO', $VERSION;
12              
13             sub import {
14 7     7   748 shift;
15              
16 7 100       499 warnings::warnif('deprecated', qq{Parameterless "use IO" deprecated})
17             if @_ == 0 ;
18            
19 7 100       38 my @l = @_ ? @_ : qw(Handle Seekable File Pipe Socket Dir);
20              
21 7         22 local @INC = @INC;
22 7 100       16 pop @INC if $INC[-1] eq '.';
23 7 100       14 eval join("", map { "require IO::" . (/(\w+)/)[0] . ";\n" } @l)
  32         446  
24             or croak $@;
25             }
26              
27             1;
28              
29             __END__