14 Apr 2003 14:51:05 UTC
- Distribution: Football-League-Match
- Module version: 0.01
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (356 / 0 / 14)
- KwaliteeBus factor: 0
- 96.61% Coverage
- License: unknown
- Activity24 month
- Download (2.76KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- ADDITIONAL INFO
- SHOWING YOUR APPRECIATION
- SEE ALSO
- COPYRIGHT AND LICENSE
Football::League::Match - A single footie match
use Football::League::Match; my $match = Football::League::Match->from_soccerdata($data); my $final_year_of_season = $match->final_year_of_season; my $division = $match->division; my $hometeam = $match->home_team; my $awayteam = $match->away_team; my $homescore = $match->home_score; my $awaycore = $match->away_score; my $result = $match->result; my Time::Piece $date = $match->date;
This will create a little object with when passed data about a footie match.
Currently, the only format the data can ve passed in is that defined by that supplied by
my $fyos = $match->final_year_of_season;
This will return the final year of the season in which the match took place.
my $division = $match->division;
This is the divison the match took place in.
my $home_team = $match->home_team;
The home team.
my $away_team = $match->away_team;
The away team.
my $home_score = $match->home_score;
The number of goals the home team scored.
my $away_score = $match->away_score;
The number of goals the away team scored.
my $result = $match->result;
This is the result in 2-1 type form.
my Time::Piece $date = $match->date;
This is the date of the match as a Time::Piece object.
The data supplied by soccerdata is in the form:
1 = final year of season (4 digit) 2 = division (P/1/2/3) 3 = home team (12 xharacters) 4 = home score (2 digits) 5 = away team (12 characters) 6 = away score (2 digits) 7 = match date (YYYYMMDD)
Well, this isn't really an inspired (or inspiring) moudle. As you may (or may not) guess, this is part of A Bigger Picture.
o Parse different match formats, perhaps screen scraped from some site every saturday night.
Craig McLaughlan has a lot to answer for. Mona, mostly.
There was a thread on london.pm mailing list about working in a vacumn - that it was a bit depressing to keep writing modules but never get any feedback. So, if you use and like this module then please send me an email and make my day.
All it takes is a few little bytes.
(Leon wrote that, not me!)
Stray Toaster, <firstname.lastname@example.org>
Copyright 2003 by Stray Toaster
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Football::League::Match, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Football::League::Match
For more information on module installation, please visit the detailed CPAN module installation guide.