MemHandle.pm

filter: Statementstmt 91.6% 33 / 36 Branchbran n/a Conditioncond 40.0% 2 / 5 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 88.8% 8 / 9 Podpod 100% 4 / 4 totaltotal 83.9% 47 / 56 CC 3 SCAR 5.2
CC
3
Cov
85%
new
3.2
tell
2.0
BEGIN
1.0
CRAP 1.7
« MemHandle/Tie.pm ↑ Summary
1 package MemHandle;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 require IO::Handle;
6 1 require IO::Seekable;
7 1 ▶use Symbol;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use MemHandle::Tie;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 require Exporter;
11 1 ▶use 5.000;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 @ISA = qw(IO::Handle IO::Seekable Exporter);
14 # Items to export into callers namespace by default. Note: do not export
15 # names by default without a very good reason. Use EXPORT_OK instead.
16 # Do not simply export all your public functions/methods/constants.
17 1 @EXPORT = qw(
18
19 );
20 1 $VERSION = '0.07';
21  
22  
23 # Preloaded methods go here.
24 1 ▶sub new {
Subroutine new: called CC=3 SCAR=11.6
Pod documented
25 1 my( $class, $mem ) = @_;
26 1 ▶ $class = ref( $class ) || $class || 'MemHandle';
Condition40%2/5
ref $class || $class || 'MemHandle'
l!l
10
ref $class or $class
l!l&&r!l&&!r
010
MC/DC0%0/2
ref $class || $class || 'MemHandle'
ref $class $class
Truth table33%1/3
A or B
A= ref $classB= $class
ABresult
1X1
011
000
27 1 my $fh = gensym;
28  
29 1 ${*$fh} = tie *$fh, 'MemHandle::Tie', $mem;
30  
31 1 bless $fh, $class;
32 }
33  
34 1 ▶sub seek {
Subroutine seek: called CC=1 SCAR=0.0
Pod documented
35 1 my $fh = shift;
36 1 ${*$fh}->SEEK( @_ );
37 }
38  
39 0 ▶sub tell {
Subroutine tell: not called CC=1 SCAR=6.9
Pod documented
40 0 my $fh = shift;
41 0 ${*$fh}->TELL( @_ );
42 }
43  
44 1 ▶sub mem {
Subroutine mem: called CC=1 SCAR=0.0
Pod documented
45 1 my $fh = shift;
46 1 ${*$fh}->mem( @_ );
47 }
48  
49 # Autoload methods go after =cut, and are processed by the autosplit program.
50  
51 1 1;
52 __END__
« MemHandle/Tie.pm ↑ Summary