File Coverage

blib/lib/WWW/Baseball/NPB/Game.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 2 0.0
total 20 22 90.9


line stmt bran cond sub pod time code
1             package WWW::Baseball::NPB::Game;
2              
3 4     4   24 use strict;
  4         8  
  4         161  
4 4     4   21 use vars qw($VERSION);
  4         9  
  4         530  
5             $VERSION = 0.03;
6              
7             sub new {
8 18     18 0 106 my($class, %p) = @_;
9 18         374 bless {%p}, $class;
10             }
11              
12             sub score {
13 8     8 0 18 my($self, $name) = @_;
14 8         132 return $self->{score}->{$name};
15             }
16              
17 4     4   22 no strict 'refs';
  4         7  
  4         352  
18             for my $meth (qw(home visitor league status stadium)) {
19 26     26   13745 *$meth = sub { shift->{$meth} };
20             }
21              
22             1;
23             __END__