line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Baseball::Sabermetrics::Team; |
2
|
2
|
|
|
2
|
|
567
|
use Baseball::Sabermetrics::abstract; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
43
|
|
3
|
2
|
|
|
2
|
|
9
|
use strict; |
|
2
|
|
|
|
|
1
|
|
|
2
|
|
|
|
|
288
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our @ISA = qw/ Baseball::Sabermetrics::abstract /; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub players |
8
|
|
|
|
|
|
|
{ |
9
|
0
|
|
|
0
|
0
|
|
my ($self, $name) = @_; |
10
|
0
|
0
|
|
|
|
|
if ($name) { |
11
|
0
|
0
|
|
|
|
|
die "Player not found: $name\n" unless exists $self->{players}->{$name}; |
12
|
0
|
|
|
|
|
|
return $self->{players}->{$name}; |
13
|
|
|
|
|
|
|
} |
14
|
0
|
|
|
|
|
|
return values %{$self->{players}}; |
|
0
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub pitchers |
18
|
|
|
|
|
|
|
{ |
19
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
20
|
0
|
0
|
|
|
|
|
return grep { exists $_->{np} and $_->{np} > 0 } $self->players; |
|
0
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub batters |
24
|
|
|
|
|
|
|
{ |
25
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
26
|
0
|
0
|
|
|
|
|
return grep { exists $_->{pa} and $_->{pa} > 0 } $self->players; |
|
0
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |