| 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
| |||||||||||
| 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
| |||||||||||
| 83 | 0 | my ($error, $val) = constant($constname); | |||||||||
| 84 | 0 | ▶ | if ($error) { croak $error; } | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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__ | ||||||||||