File Coverage

blib/lib/Acme/MilkyHolmes.pm
Criterion Covered Total %
statement 43 43 100.0
branch 2 2 100.0
condition n/a
subroutine 13 13 100.0
pod 2 2 100.0
total 60 60 100.0


line stmt bran cond sub pod time code
1             package Acme::MilkyHolmes;
2 3     3   3475 use 5.008005;
  3         10  
3 3     3   15 use strict;
  3         4  
  3         60  
4 3     3   22 use warnings;
  3         5  
  3         81  
5 3     3   2103 use parent qw(Exporter);
  3         864  
  3         17  
6              
7             our $VERSION = "0.06";
8              
9 3     3   1832 use Acme::MilkyHolmes::Character::SherlockShellingford;
  3         8  
  3         114  
10 3     3   1679 use Acme::MilkyHolmes::Character::NeroYuzurizaki;
  3         7  
  3         105  
11 3     3   1687 use Acme::MilkyHolmes::Character::HerculeBarton;
  3         7  
  3         90  
12 3     3   1592 use Acme::MilkyHolmes::Character::CordeliaGlauca;
  3         6  
  3         93  
13 3     3   1598 use Acme::MilkyHolmes::Character::KazumiTokiwa;
  3         9  
  3         117  
14 3     3   1736 use Acme::MilkyHolmes::Character::AliceMyojingawa;
  3         8  
  3         90  
15 3     3   2394 use Readonly;
  3         9314  
  3         919  
16              
17             Readonly our $MilkyHolmesFeathers => [
18             'KazumiTokiwa',
19             'AliceMyojingawa',
20             ];
21             Readonly our $MilkyHolmes => [
22             'SherlockShellingford',
23             'NeroYuzurizaki',
24             'HerculeBarton',
25             'CordeliaGlauca',
26             ];
27             Readonly our $MilkyHolmesSisters => [
28             @{ $MilkyHolmes },
29             @{ $MilkyHolmesFeathers },
30             ];
31              
32             our @EXPORT_OK = qw($MilkyHolmes $MilkyHolmesFeathers $MilkyHolmesSisters);
33              
34              
35             sub members {
36 2     2 1 2615 my ($class, %options) = @_;
37 2         9 return $class->members_of($MilkyHolmes, %options);
38             }
39              
40             sub members_of {
41 8     8 1 10627 my ($class, $team, %options) = @_;
42              
43 8         49 my @members = ();
44 8         20 for my $member_name ( @{ $team } ) {
  8         18  
45 32         64 my $pkg = "Acme::MilkyHolmes::Character::$member_name";
46 32         362 my $member = $pkg->new();
47 32 100       212 $member->locale($options{locale}) if ( exists $options{locale} );
48 32         68 push @members, $member;
49             }
50 8         38 return @members;
51             }
52              
53              
54             1;
55             __END__