blib/lib/Class/Axelerator.pm

filter: Statementstmt 94.1% 16 / 17 Branchbran 25.0% 1 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 84.0% 21 / 25 CC 3 SCAR 9.4
CC
3
Cov
81%
__ANON__
4.1
BEGIN
1.0
BEGIN
1.0
CRAP 2.6
↑ Summary
1 #
2 # $Id: Axelerator.pm,v 0.2 2009/02/15 02:25:03 dankogai Exp dankogai $
3 #
4 package Class::Axelerator;
5 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 our $VERSION = sprintf "%d.%02d", q$Revision: 0.2 $ =~ /(\d+)/g;
8 2 ▶use Filter::Simple;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 our $DEBUG = 0;
10  
11 1 ▶FILTER_ONLY code => sub {
Subroutine __ANON__: called CC=3 SCAR=14.2
12 1 s{
13 -> # arrow operator
14 ([A-Za-z_][0-9A-Za-z_]+) # method name
15 (\(?) # explicitly invoked?
16 }{
17 0 ▶ $2 ? "->$1$2" # leave it alone
Branch: 1 branch
BranchTrueFalseTotal
$2 ? : 0 0 0
18 : "->{$1}" # make it a simple hash deref
19 }msegx;
20 1 ▶ warn $_ if $DEBUG;
Branch: 1 branch
BranchTrueFalseTotal
if $Class::Axelerator::DEBUG 0 1 1
21 1 $_;
22 2 };
23  
24 2 1; # End of Class::Axelerator
25  
26 __END__
↑ Summary