WWW::Baseball::NPB - Fetches Japanese baseball games information
use WWW::Baseball::NPB; my $baseball = WWW::Baseball::NPB->new; my @games = $baseball->games; # or @games = $baseball->games('central'); for my $game (@games) { my $home = $game->home; my $visitor = $game->visitor; printf "%s %d - %d %s (%s) [%s]\n", $home, $game->score($home), $game->score($visitor), $visitor, $game->status, $game->stadium; }
WWW::Baseball::NPB provides you a way to fetch and extract Japanese baseball games information via Yahoo! Baseball. (NPB = Nippon Professional Baseball)
Characters like team names, status and stadium are encoded in EUC-JP. You can convert them to any encoding via Jcode.
Separate out Yahoo! Baseball parsing logic, using information provider architecture (e.g. WWW::Baseball::NPB::Provider::*)
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
LWP::Simple
To install WWW::Baseball::NPB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Baseball::NPB
CPAN shell
perl -MCPAN -e shell install WWW::Baseball::NPB
For more information on module installation, please visit the detailed CPAN module installation guide.