File Coverage

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


line stmt bran cond sub pod time code
1             package Acme::MilkyHolmes;
2 3     3   2621 use 5.008005;
  3         7  
  3         95  
3 3     3   12 use strict;
  3         4  
  3         74  
4 3     3   21 use warnings;
  3         2  
  3         71  
5 3     3   1322 use parent qw(Exporter);
  3         784  
  3         13  
6              
7             our $VERSION = "0.05";
8              
9 3     3   1195 use Acme::MilkyHolmes::Character::SherlockShellingford;
  3         7  
  3         111  
10 3     3   1165 use Acme::MilkyHolmes::Character::NeroYuzurizaki;
  3         6  
  3         768  
11 3     3   1063 use Acme::MilkyHolmes::Character::HerculeBarton;
  3         6  
  3         732  
12 3     3   971 use Acme::MilkyHolmes::Character::CordeliaGlauca;
  3         4  
  3         78  
13 3     3   1010 use Acme::MilkyHolmes::Character::KazumiTokiwa;
  3         7  
  3         111  
14 3     3   1074 use Acme::MilkyHolmes::Character::AliceMyojingawa;
  3         6  
  3         74  
15 3     3   1469 use Readonly;
  3         6974  
  3         841  
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 2815 my ($class, %options) = @_;
37 2         9 return $class->members_of($MilkyHolmes, %options);
38             }
39              
40             sub members_of {
41 8     8 1 11785 my ($class, $team, %options) = @_;
42              
43 8         40 my @members = ();
44 8         9 for my $member_name ( @{ $team } ) {
  8         16  
45 32         53 my $pkg = "Acme::MilkyHolmes::Character::$member_name";
46 32         335 my $member = $pkg->new();
47 32 100       184 $member->locale($options{locale}) if ( exists $options{locale} );
48 32         60 push @members, $member;
49             }
50 8         28 return @members;
51             }
52              
53              
54             1;
55             __END__