fcntl.pm

filter: Statementstmt 48.2% 14 / 29 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 28.5% 4 / 14 Podpod 87.5% 7 / 8 totaltotal 44.6% 25 / 56 CC 3 SCAR 12.9
CC
3
Cov
42%
fcntl
12.0
DESTROY
2.0
fcntl_
2.0
CRAP 3.6
« Lockable.pm ↑ Summary flock.pm »
1 package IO::File::fcntl;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use base qw(IO::File::Lockable);
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Fcntl;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 $VERSION = '0.31';
7 ######################################################################
8 0 ▶sub DESTROY :method {shift->fcntl_un}
Subroutine DESTROY: not called CC=1 SCAR=6.9
9 0 ▶sub fcntl_ :method {CORE::fcntl($_[0],$_[1],$_[2])}
Subroutine fcntl_: not called CC=1 SCAR=6.9
Pod undocumented
10 ##### override
11 0 ▶sub lock_ex :method {shift->fcntl_ex(@_)}
Subroutine lock_ex: not called CC=1 SCAR=6.9
Pod documented
12 0 ▶sub lock_sh :method {shift->fcntl_sh(@_)}
Subroutine lock_sh: not called CC=1 SCAR=6.9
Pod documented
13 0 ▶sub lock_un :method {shift->fcntl_un(@_)}
Subroutine lock_un: not called CC=1 SCAR=6.9
Pod documented
14 ##### fcntl oop i/f
15 0 ▶sub fcntl :method {
Subroutine fcntl: not called CC=3 SCAR=24.8
Pod documented
16 0 my $fh = shift;
17 0 my $lock = shift;
18 0 ▶ my $timeout = shift || 0;
Condition0%0/2
shift() || 0
l!l
00
MC/DC0%0/1
shift() || 0
shift()
Truth table0%0/2
A
A= shift()
Aresult
11
00
19 0 ▶ return $fh unless($fh->opened);
Branch: 1 branch
BranchTrueFalseTotal
unless $fh->opened 0 0 0
20 return $fh->set_timeout(
21 0 ▶ $timeout => sub {fcntl_($fh,F_SETLKW,pack('ssx32',$lock,0));$fh}
Subroutine __ANON__: not called CC=1 SCAR=6.9
22 0 );
23 }
24 0 ▶sub fcntl_sh :method {shift->fcntl(F_RDLCK,@_)}
Subroutine fcntl_sh: not called CC=1 SCAR=6.9
Pod documented
25 0 ▶sub fcntl_ex :method {shift->fcntl(F_WRLCK,@_)}
Subroutine fcntl_ex: not called CC=1 SCAR=6.9
Pod documented
26 0 ▶sub fcntl_un :method {shift->fcntl(F_UNLCK,@_)}
Subroutine fcntl_un: not called CC=1 SCAR=6.9
Pod documented
27 1 1;
28 __END__
« Lockable.pm ↑ Summary flock.pm »