| 1 | package IO::FD::DWIM; | ||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 1 | ▶ | use IO::FD; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use Exporter "import"; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 1 | our %EXPORT_TAGS = ( 'all' => [ qw( | |||||||||
| 9 | socket | ||||||||||
| 10 | socketpair | ||||||||||
| 11 | shutdown | ||||||||||
| 12 | bind | ||||||||||
| 13 | listen | ||||||||||
| 14 | accept | ||||||||||
| 15 | connect | ||||||||||
| 16 | getsockopt | ||||||||||
| 17 | setsockopt | ||||||||||
| 18 | getpeername | ||||||||||
| 19 | getsockname | ||||||||||
| 20 | |||||||||||
| 21 | sysopen | ||||||||||
| 22 | sysseek | ||||||||||
| 23 | |||||||||||
| 24 | pipe | ||||||||||
| 25 | |||||||||||
| 26 | close | ||||||||||
| 27 | recv | ||||||||||
| 28 | send | ||||||||||
| 29 | |||||||||||
| 30 | sysread | ||||||||||
| 31 | syswrite | ||||||||||
| 32 | |||||||||||
| 33 | stat | ||||||||||
| 34 | lstat | ||||||||||
| 35 | |||||||||||
| 36 | |||||||||||
| 37 | |||||||||||
| 38 | fcntl | ||||||||||
| 39 | ioctl | ||||||||||
| 40 | |||||||||||
| 41 | readline | ||||||||||
| 42 | fileno | ||||||||||
| 43 | ) ] ); | ||||||||||
| 44 | |||||||||||
| 45 | 1 | our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); | |||||||||
| 46 | |||||||||||
| 47 | 1 | our @EXPORT=@EXPORT_OK; | |||||||||
| 48 | |||||||||||
| 49 | |||||||||||
| 50 | #SOCKETS | ||||||||||
| 51 | sub socket :prototype($$$$) | ||||||||||
| 52 | 0 | ▶ | {ref($_[0]) ? &CORE::socket : &IO::FD::socket; } | ||||||||
|
Subroutine
socket: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 53 | |||||||||||
| 54 | sub socketpair:prototype($$$$$) | ||||||||||
| 55 | 0 | ▶ | {ref($_[0]) ? &CORE::socketpair : &IO::FD::socketpair; } | ||||||||
|
Subroutine
socketpair: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 56 | |||||||||||
| 57 | sub shutdown:prototype($$) | ||||||||||
| 58 | 0 | ▶ | {ref($_[0]) ? &CORE::shutdown : &IO::FD::shutdown; } | ||||||||
|
Subroutine
shutdown: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 59 | |||||||||||
| 60 | sub bind:prototype($$) | ||||||||||
| 61 | 0 | ▶ | {ref($_[0]) ? &CORE::bind : &IO::FD::bind; } | ||||||||
|
Subroutine
bind: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 62 | |||||||||||
| 63 | sub listen:prototype($$) | ||||||||||
| 64 | 0 | ▶ | {ref($_[0]) ? &CORE::listen : &IO::FD::listen; } | ||||||||
|
Subroutine
listen: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 65 | |||||||||||
| 66 | sub accept:prototype($$) | ||||||||||
| 67 | 0 | ▶ | {ref($_[0]) ? &CORE::accept : &IO::FD::accept; } | ||||||||
|
Subroutine
accept: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 68 | |||||||||||
| 69 | sub connect:prototype($$) | ||||||||||
| 70 | 0 | ▶ | {ref($_[0]) ? &CORE::connect : &IO::FD::connect; } | ||||||||
|
Subroutine
connect: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 71 | |||||||||||
| 72 | sub getsockopt:prototype($$$) | ||||||||||
| 73 | 0 | ▶ | {ref($_[0]) ? &CORE::getsockopt : &IO::FD::getsockopt; } | ||||||||
|
Subroutine
getsockopt: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 74 | |||||||||||
| 75 | sub setsockopt:prototype($$$$) | ||||||||||
| 76 | 0 | ▶ | {ref($_[0]) ? &CORE::setsockopt : &IO::FD::setsockopt; } | ||||||||
|
Subroutine
setsockopt: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 77 | |||||||||||
| 78 | sub getpeername:prototype($) | ||||||||||
| 79 | 0 | ▶ | {ref($_[0]) ? &CORE::getpeername : &IO::FD::getpeername; } | ||||||||
|
Subroutine
getpeername: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 80 | |||||||||||
| 81 | sub getsockname:prototype($) | ||||||||||
| 82 | 0 | ▶ | {ref($_[0]) ? &CORE::getsockname : &IO::FD::getsockname; } | ||||||||
|
Subroutine
getsockname: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 83 | |||||||||||
| 84 | #FILES | ||||||||||
| 85 | |||||||||||
| 86 | sub sysopen:prototype($$$@) | ||||||||||
| 87 | 0 | ▶ | {ref($_[0]) ? &CORE::sysopen : &IO::FD::sysopen; } | ||||||||
|
Subroutine
sysopen: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 88 | |||||||||||
| 89 | sub sysseek:prototype($$$) | ||||||||||
| 90 | 0 | ▶ | {ref($_[0]) ? &CORE::sysseek : &IO::FD::sysseek; } | ||||||||
|
Subroutine
sysseek: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 91 | |||||||||||
| 92 | #PIPE | ||||||||||
| 93 | |||||||||||
| 94 | sub pipe:prototype($$) | ||||||||||
| 95 | 1 | ▶ | {ref($_[0]) ? &CORE::pipe : &IO::FD::pipe; } | ||||||||
|
Subroutine
pipe: called CC=2 SCAR=7.6
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 96 | |||||||||||
| 97 | |||||||||||
| 98 | |||||||||||
| 99 | #COMMON | ||||||||||
| 100 | |||||||||||
| 101 | sub close($) | ||||||||||
| 102 | 2 | ▶ | {ref($_[0]) ? &CORE::close : &IO::FD::close; } | ||||||||
|
Subroutine
close: called CC=2 SCAR=7.6
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 103 | |||||||||||
| 104 | sub recv:prototype($$$$) | ||||||||||
| 105 | 0 | ▶ | {ref($_[0]) ? &CORE::recv : &IO::FD::recv; } | ||||||||
|
Subroutine
recv: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 106 | |||||||||||
| 107 | sub send:prototype($$$@) | ||||||||||
| 108 | 0 | ▶ | {ref($_[0]) ? &CORE::send : &IO::FD::send; } | ||||||||
|
Subroutine
send: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 109 | |||||||||||
| 110 | |||||||||||
| 111 | sub sysread:prototype($\$$@) | ||||||||||
| 112 | 2 | ▶ | {ref($_[0]) ? &CORE::sysread : &IO::FD::sysread; } | ||||||||
|
Subroutine
sysread: called CC=2 SCAR=7.6
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 113 | |||||||||||
| 114 | sub syswrite:prototype($$@) | ||||||||||
| 115 | 2 | ▶ | {ref($_[0]) ? &CORE::syswrite : &IO::FD::syswrite; } | ||||||||
|
Subroutine
syswrite: called CC=2 SCAR=7.6
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 116 | |||||||||||
| 117 | |||||||||||
| 118 | sub stat($) | ||||||||||
| 119 | 0 | ▶ | {ref($_[0]) ? &CORE::stat : &IO::FD::stat; } | ||||||||
|
Subroutine
stat: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 120 | sub lstat($) | ||||||||||
| 121 | 0 | ▶ | {ref($_[0]) ? &CORE::lstat : &IO::FD::lstat; } | ||||||||
|
Subroutine
lstat: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 122 | |||||||||||
| 123 | sub fcntl:prototype($$$) | ||||||||||
| 124 | 0 | ▶ | {ref($_[0]) ? &CORE::fcntl : &IO::FD::fcntl; } | ||||||||
|
Subroutine
fcntl: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 125 | |||||||||||
| 126 | sub ioctl:prototype($$$) | ||||||||||
| 127 | 0 | ▶ | {ref($_[0]) ? &CORE::ioctl : &IO::FD::ioctl; } | ||||||||
|
Subroutine
ioctl: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 128 | |||||||||||
| 129 | sub readline($) | ||||||||||
| 130 | 0 | ▶ | {ref($_[0]) ? &CORE::readline : &IO::FD::readline; } | ||||||||
|
Subroutine
readline: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 131 | |||||||||||
| 132 | sub fileno :prototype($) { | ||||||||||
| 133 | 0 | ▶ | ref($_[0]) | ||||||||
|
Subroutine
fileno: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 134 | ?fileno $_[0] | ||||||||||
| 135 | : $_[0]; | ||||||||||
| 136 | } | ||||||||||
| 137 | 1 | 1; | |||||||||
| 138 | __END__ | ||||||||||