File Coverage

lib/Acme/CPANAuthors/Factory.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 20 20 100.0


line stmt bran cond sub pod time code
1             package Acme::CPANAuthors::Factory;
2              
3 2     2   26506 use strict;
  2         3  
  2         58  
4 2     2   7 use warnings;
  2         2  
  2         38  
5 2     2   328 use Acme::CPANAuthors;
  2         2  
  2         156  
6              
7             sub create {
8 1     1 1 15 my ($class, %data) = @_;
9              
10 1         3 my @categories = keys %data;
11 1         3 my %authors = map { %{ $data{$_} } } @categories;
  2         2  
  2         6  
12              
13 1         7 return bless {
14             categories => \@categories,
15             authors => \%authors,
16             }, 'Acme::CPANAuthors';
17             }
18              
19             1;
20             __END__