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 0 1 0.0
total 19 20 95.0


line stmt bran cond sub pod time code
1             package Acme::CPANAuthors::Factory;
2              
3 2     2   26809 use strict;
  2         4  
  2         69  
4 2     2   8 use warnings;
  2         2  
  2         38  
5 2     2   317 use Acme::CPANAuthors;
  2         3  
  2         178  
6              
7             sub create {
8 1     1 0 13 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         6 return bless {
14             categories => \@categories,
15             authors => \%authors,
16             }, 'Acme::CPANAuthors';
17             }
18              
19             1;
20             __END__