CPANAuthors/Register.pm

filter: Statementstmt 100% 23 / 23 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 32 / 32 CC 2 SCAR 2.2
CC
2
Cov
100%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« CPANAuthors/Utils/CPANIndex.pm ↑ Summary CPANAuthors/Utils/Authors.pm »
1 package Acme::CPANAuthors::Register;
2  
3 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 7 ▶sub import {
Subroutine import: called CC=1 SCAR=0.0
7 7 my ($class, %authors) = @_;
8  
9 7 my $caller = caller;
10 {
11 6 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
12 6 ▶ no warnings 'redefine';
Subroutine BEGIN: called CC=1 SCAR=0.0
13 7 ▶ *{"$caller\::authors"} = sub { wantarray ? %authors : \%authors };
Subroutine __ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 14 3 17
14  
15 7 (my $category = $caller) =~ s/^Acme::CPANAuthors:://;
16 7 ▶ *{"$caller\::category"} = sub { $category };
Subroutine __ANON__: called CC=1 SCAR=0.0
17 }
18 }
19  
20 6 1;
21  
22 __END__
« CPANAuthors/Utils/CPANIndex.pm ↑ Summary CPANAuthors/Utils/Authors.pm »