blib/lib/IO/FD.pm

filter: Statementstmt 67.5% 25 / 37 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod 0.0% 0 / 1 totaltotal 57.6% 30 / 52 CC 4 SCAR 13.8
CC
4
Cov
58%
AUTOLOAD
8.2
fileno
6.0
__ANON__
2.0
CRAP 4.0
« blib/lib/IO/FD/DWIM.pm ↑ Summary const-c.inc »
1 package IO::FD;
2  
3 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 13 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 13 require Exporter;
8 13 ▶use AutoLoader;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 13 our @ISA = qw(Exporter);
11  
12 # Items to export into callers namespace by default. Note: do not export
13 # names by default without a very good reason. Use EXPORT_OK instead.
14 # Do not simply export all your public functions/methods/constants.
15  
16 # This allows declaration use IO::FD ':all';
17 # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
18 # will save memory.
19 13 our %EXPORT_TAGS = ( 'all' => [ qw(
20 accept
21 listen
22 socket
23 bind
24 connect
25  
26 sysopen
27 sysopen4
28 close
29  
30 sysread
31 sysread4
32  
33 syswrite
34 syswrite2
35 syswrite3
36 syswrite4
37  
38 pipe
39 socketpair
40 sysseek
41  
42 dup
43 dup2
44  
45 fcntl
46 ioctl
47  
48 getsockopt
49 setsockopt
50 select
51 poll
52  
53 mkstemp
54 mktemp
55  
56 readline
57 fileno
58 ) ] );
59  
60 13 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
61  
62 13 our @EXPORT = qw(
63
64 );
65  
66 13 our $VERSION = '0.1.2';
67  
68  
69 sub fileno :prototype($) {
70 0 ▶ ref($_[0])
Subroutine fileno: not called CC=2 SCAR=17.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 0 0 0
71 ?fileno $_[0]
72 : $_[0];
73 }
74  
75 sub AUTOLOAD {
76 # This AUTOLOAD is used to 'autoload' constants from the constant()
77 # XS function.
78  
79 0 ▶ my $constname;
Subroutine AUTOLOAD: not called CC=3 SCAR=21.1
80 0 our $AUTOLOAD;
81 0 ($constname = $AUTOLOAD) =~ s/.*:://;
82 0 ▶ croak "&IO::FD::constant not defined" if $constname eq 'constant';
Branch: 1 branch
BranchTrueFalseTotal
if $constname eq "constant" 0 0 0
83 0 my ($error, $val) = constant($constname);
84 0 ▶ if ($error) { croak $error; }
Branch: 1 branch
BranchTrueFalseTotal
if ($error) 0 0 0
85 {
86 13 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.2
87 # Fixed between 5.005_53 and 5.005_61
88 #XXX if ($] >= 5.00561) {
89 #XXX *$AUTOLOAD = sub () { $val };
90 #XXX }
91 #XXX else {
92 0 ▶ *$AUTOLOAD = sub { $val };
Subroutine __ANON__: not called CC=1 SCAR=6.9
93 #XXX }
94 }
95 0 goto &$AUTOLOAD;
96 }
97  
98 13 require XSLoader;
99 13 XSLoader::load('IO::FD', $VERSION);
100  
101 # Preloaded methods go here.
102  
103 # Autoload methods go after =cut, and are processed by the autosplit program.
104  
105 13 1;
106 __END__
« blib/lib/IO/FD/DWIM.pm ↑ Summary const-c.inc »