line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::YahooJapan::Baseball; |
2
|
1
|
|
|
1
|
|
738
|
use 5.008001; |
|
1
|
|
|
|
|
3
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
40
|
|
5
|
1
|
|
|
1
|
|
874
|
use utf8; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
4
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
514
|
use WWW::YahooJapan::Baseball::Game; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
11
|
|
8
|
1
|
|
|
1
|
|
30
|
use WWW::YahooJapan::Baseball::Parser; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
9
|
1
|
|
|
1
|
|
22
|
use URI; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = "0.01"; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
0
|
|
|
0
|
0
|
|
my ($class, %self) = @_; |
15
|
0
|
|
|
|
|
|
for my $required (qw/date league/) { |
16
|
0
|
0
|
|
|
|
|
unless (defined $self{$required}) { |
17
|
0
|
|
|
|
|
|
return undef; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
} |
20
|
0
|
0
|
|
|
|
|
unless (defined $self{prefix}) { |
21
|
0
|
|
|
|
|
|
$self{prefix} = 'http://baseball.yahoo.co.jp'; |
22
|
|
|
|
|
|
|
} |
23
|
0
|
|
|
|
|
|
bless \%self, $class; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub games { |
27
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
28
|
0
|
|
|
|
|
|
my $uri = URI->new($self->{prefix} . '/npb/schedule/?date=' . $self->{date}); |
29
|
0
|
|
|
|
|
|
my @game_uris = WWW::YahooJapan::Baseball::Parser::parse_games_page($self->{date}, $self->{league}, uri => $uri); |
30
|
0
|
|
|
|
|
|
map { WWW::YahooJapan::Baseball::Game->new(uri => $_) } @game_uris; |
|
0
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
__END__ |