blib/lib/TableData/Acme/CPANAuthors.pm

filter: Statementstmt 73.1% 30 / 41 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod n/a totaltotal 73.0% 38 / 52 SCAR 11.8
CC
3
Cov
70%
__ANON__
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.2
↑ Summary
1 package ## no critic: Modules::RequireFilenameMatchesPackage
2 # hide from PAUSE
3 TableDataRole::Acme::CPANAuthors;
4  
5 1 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶use Role::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 with 'TableDataRole::Source::AOA';
11  
12 around new => sub {
13 0 ▶ require Acme::CPANAuthors;
Subroutine __ANON__: not called CC=3 SCAR=24.8
14  
15 0 my $orig = shift;
16 0 my ($self, %args) = @_;
17  
18 my $module = delete $args{module}
19 0 ▶ or die "Please specify 'module' argument";
Branch: 1 branch
BranchTrueFalseTotal
my $module = delete $args{"module"} or die "Please specify 'module' argument" 0 0 0
20 0 $module =~ s/\AAcme::CPANAuthors:://;
21 0 my $authors = Acme::CPANAuthors->new($module);
22  
23 0 my $aoa = [];
24 0 my $column_names = [qw/
25 cpanid
26 name
27 /];
28 0 for my $cpanid ($authors->id) {
29 0 push @$aoa, [
30 $cpanid,
31 $authors->name($cpanid),
32 ];
33 }
34  
35 0 $orig->($self, %args, aoa => $aoa, column_names=>$column_names);
36 1 };
37  
38 package TableData::Acme::CPANAuthors;
39  
40 1 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
41 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
42 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
43  
44 1 ▶use Role::Tiny::With;
Subroutine BEGIN: called CC=1 SCAR=0.0
45  
46 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
47 1 our $DATE = '2023-06-17'; # DATE
48 1 our $DIST = 'TableData-Acme-CPANAuthors'; # DIST
49 1 our $VERSION = '0.002'; # VERSION
50  
51 1 with 'TableDataRole::Acme::CPANAuthors';
52  
53 # STATS
54  
55 1 1;
56 # ABSTRACT: Authors listed in a Acme::CPANAuthors::* module
57  
58 __END__
↑ Summary