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 | 50173 | use strict; | |||
2 | 5 | ||||||
2 | 61 | ||||||
4 | 2 | 2 | 11 | use warnings; | |||
2 | 3 | ||||||
2 | 59 | ||||||
5 | 2 | 2 | 660 | use Acme::CPANAuthors; | |||
2 | 3 | ||||||
2 | 212 | ||||||
6 | |||||||
7 | sub create { | ||||||
8 | 1 | 1 | 1 | 19 | my ($class, %data) = @_; | ||
9 | |||||||
10 | 1 | 5 | my @categories = keys %data; | ||||
11 | 1 | 3 | my %authors = map { %{ $data{$_} } } @categories; | ||||
2 | 3 | ||||||
2 | 9 | ||||||
12 | |||||||
13 | 1 | 10 | return bless { | ||||
14 | categories => \@categories, | ||||||
15 | authors => \%authors, | ||||||
16 | }, 'Acme::CPANAuthors'; | ||||||
17 | } | ||||||
18 | |||||||
19 | 1; | ||||||
20 | __END__ |