Memoize.pm

filter: Statementstmt 100% 19 / 19 Branchbran 100% 2 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 84.3% 27 / 32 CC 3 SCAR 6.4
CC
3
Cov
92%
Memoize
3.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« Util.pm ↑ Summary SigHandler.pm »
1 package Attribute::Memoize;
2  
3 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use Attribute::Handlers;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 4 our $VERSION = sprintf "%d.%02d", q$Revision: 1.2 $ =~ /(\d+)/g;
8  
9 3 ▶sub UNIVERSAL::Memoize :ATTR(CODE) {
Subroutine Memoize: called CC=3 SCAR=11.2
Pod undocumented
10 3 my ($pkg, $symbol, $options) = @_[0,1,4];
11 3 ▶ $options = [ $options || () ] unless ref $options eq 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
unless ref $options eq "ARRAY" 2 1 3
Condition33%1/3
$options || ()
l!l&&r!l&&!r
002
MC/DC0%0/2
$options || ()
$options ()
Truth table33%1/3
A || B
A= $optionsB= ()
ABresult
1X1
011
000
12 3 require Memoize;
13 3 Memoize::memoize($pkg . '::' . *{$symbol}{NAME}, @$options);
14 4 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 4 "Rosebud"; # for MARCEL's sake, not 1 -- dankogai
17  
18 __END__
« Util.pm ↑ Summary SigHandler.pm »