| 1 | package Baseball::Sabermetrics::Team; | ||||||||||
| 2 | 2 | ▶ | use Baseball::Sabermetrics::abstract; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 2 | our @ISA = qw/ Baseball::Sabermetrics::abstract /; | |||||||||
| 6 | |||||||||||
| 7 | sub players | ||||||||||
| 8 | { | ||||||||||
| 9 | 0 | ▶ | my ($self, $name) = @_; | ||||||||
|
Subroutine
players: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 10 | 0 | ▶ | if ($name) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 11 | 0 | ▶ | die "Player not found: $name\n" unless exists $self->{players}->{$name}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 12 | 0 | return $self->{players}->{$name}; | |||||||||
| 13 | } | ||||||||||
| 14 | 0 | return values %{$self->{players}}; | |||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | sub pitchers | ||||||||||
| 18 | { | ||||||||||
| 19 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
pitchers: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 20 | 0 | ▶ | return grep { exists $_->{np} and $_->{np} > 0 } $self->players; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | sub batters | ||||||||||
| 24 | { | ||||||||||
| 25 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
batters: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 26 | 0 | ▶ | return grep { exists $_->{pa} and $_->{pa} > 0 } $self->players; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | 2 | 1; | |||||||||