blib/lib/Linux/PipeMagic.pm

filter: Statementstmt 97.3% 37 / 38 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod n/a totaltotal 94.0% 47 / 50 SCAR 11.0
CC
3
Cov
93%
AUTOLOAD
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
↑ Summary const-xs.inc »
1 package Linux::PipeMagic;
2  
3 5 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 5 require Exporter;
9 5 ▶use AutoLoader;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 5 our @ISA = qw(Exporter);
12  
13 # Items to export into callers namespace by default. Note: do not export
14 # names by default without a very good reason. Use EXPORT_OK instead.
15 # Do not simply export all your public functions/methods/constants.
16  
17 # This allows declaration use Linux::PipeMagic ':all';
18 # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
19 # will save memory.
20 5 our %EXPORT_TAGS = ( 'all' => [ qw(
21 systee
22 syssplice
23 syssendfile
24 SPLICE_F_MOVE
25 SPLICE_F_NONBLOCK
26 SPLICE_F_MORE
27 SPLICE_F_GIFT
28 ) ] );
29  
30 5 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
31  
32 5 our @EXPORT = qw();
33  
34 5 our $VERSION = '0.04_01';
35  
36 sub AUTOLOAD {
37 # This AUTOLOAD is used to 'autoload' constants from the constant()
38 # XS function.
39  
40 4 ▶ my $constname;
Subroutine AUTOLOAD: called CC=3 SCAR=11.1
41 4 our $AUTOLOAD;
42 4 ($constname = $AUTOLOAD) =~ s/.*:://;
43 4 ▶ croak "&Linux::PipeMagic::constant not defined" if $constname eq 'constant';
Branch: 1 branch
BranchTrueFalseTotal
if $constname eq "constant" 0 4 4
44 4 my ($error, $val) = constant($constname);
45 4 ▶ if ($error) { croak $error; }
Branch: 1 branch
BranchTrueFalseTotal
if ($error) 0 4 4
46 {
47 5 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
48 # Fixed between 5.005_53 and 5.005_61
49 #XXX if ($] >= 5.00561) {
50 #XXX *$AUTOLOAD = sub () { $val };
51 #XXX }
52 #XXX else {
53 4 ▶ *$AUTOLOAD = sub { $val };
Subroutine __ANON__: called CC=1 SCAR=0.0
54 #XXX }
55 }
56 4 goto &$AUTOLOAD;
57 }
58  
59 5 require XSLoader;
60 5 XSLoader::load('Linux::PipeMagic', $VERSION);
61  
62 # Preloaded methods go here.
63  
64 # Autoload methods go after =cut, and are processed by the autosplit program.
65  
66 5 1;
67 __END__
↑ Summary const-xs.inc »