SymbolRef.pm

filter: Statementstmt 41.8% 18 / 43 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 22.2% 4 / 18 Podpod 0.0% 0 / 1 totaltotal 34.3% 22 / 64 CC 2 SCAR 6.9
CC
2
Cov
40%
name
6.0
TIESCALAR
2.0
PRINTF
2.0
CRAP 2.0
« ModuleSymbol.pm ↑ Summary
1 package Lib::SymbolRef;
2 # $Id: SymbolRef.pm,v 1.4 2004/03/21 02:17:02 kiesling Exp $
3  
4 # Copyright © 2001-2004 Robert Kiesling, rkies@cpan.org.
5 #
6 # Licensed under the same terms as Perl. Refer to the file,
7 # "Artistic," for information.
8  
9 1 $VERSION=0.53;
10 1 ▶use vars qw( @ISA @EXPORT @EXPORT_OK $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 push @ISA, qw( Exporter DB );
12 1 @EXPORT_OK=qw($VERSION);
13  
14 1 require Exporter;
15 1 require Carp;
16 1 ▶use Lib::ModuleSymbol;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 0 ▶sub TIESCALAR {
Subroutine TIESCALAR: not called CC=1 SCAR=6.9
19 0 my ($package, $name, $refer) = @_;
20 0 my $obj = { name => $name, refs=>() };
21 0 bless $obj, $package;
22 0 return $obj;
23 }
24  
25 0 ▶sub TIEHANDLE {
Subroutine TIEHANDLE: not called CC=1 SCAR=0.6
26 0 my ($package, $name, $refer) = @_;
27 ### Until re-tied.
28 1 ▶ no warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
29 0 my $obj = { name => $name, refs => () };
30 1 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
31 0 bless $obj, $package;
32 0 return $obj;
33 }
34  
35 0 ▶sub TIEARRAY {
Subroutine TIEARRAY: not called CC=1 SCAR=0.0
36 }
37  
38 0 ▶sub PRINTF {
Subroutine PRINTF: not called CC=1 SCAR=6.9
39 0 my $self = shift;
40 0 my $fmt = shift;
41 }
42  
43 0 ▶sub FETCH {
Subroutine FETCH: not called CC=1 SCAR=6.9
44 0 return undef;
45 }
46  
47 0 ▶sub GETC {
Subroutine GETC: not called CC=1 SCAR=6.9
48 0 return undef;
49 }
50  
51 0 ▶sub READ {
Subroutine READ: not called CC=1 SCAR=6.9
52 0 return undef;
53 }
54  
55 0 ▶sub OPEN {
Subroutine OPEN: not called CC=1 SCAR=6.9
56 0 return undef;
57 }
58  
59 0 ▶sub READLINE {
Subroutine READLINE: not called CC=1 SCAR=6.9
60 0 return undef;
61 }
62  
63 0 ▶sub STORE {
Subroutine STORE: not called CC=1 SCAR=6.9
64 0 return undef;
65 }
66  
67  
68 # ---- Hash methods -----
69  
70  
71 0 ▶sub TIEHASH {
Subroutine TIEHASH: not called CC=1 SCAR=6.9
72 0 my ($varref, $package, $callingpkg ) = @_;
73 0 my $obj = [ name => $varref, callingpkg => $callingpkg, {%$hr} ];
74 0 bless $obj, $package;
75 0 print "TIEHASH: $varref, $package, $callingpkg\n";
76 0 return $obj;
77 }
78  
79 0 ▶sub FIRSTKEY {
Subroutine FIRSTKEY: not called CC=1 SCAR=0.0
80 }
81  
82 0 ▶sub CLEAR {
Subroutine CLEAR: not called CC=1 SCAR=0.0
83 }
84  
85 # ---- Instance methods
86  
87 0 ▶sub name {
Subroutine name: not called CC=2 SCAR=17.9
Pod undocumented
88 0 my $self = shift;
89 0 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 0 0 0
90 0 $self -> {name} = shift;
91 }
92 return $self -> {name}
93 0 }
94  
95 1 1;
96  
« ModuleSymbol.pm ↑ Summary