NAME
Football::League::Match - A single footie match
SYNOPSIS
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;
DESCRIPTION
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
http://www.soccerdata.com
METHODS
final_year_of_season
my $fyos = $match->final_year_of_season;
This will return the final year of the season in which the match took place.
divison
my $division = $match->division;
This is the divison the match took place in.
home_team
my $home_team = $match->home_team;
The home team.
away_team
my $away_team = $match->away_team;
The away team.
home_score
my $home_score = $match->home_score;
The number of goals the home team scored.
away_score
my $away_score = $match->away_score;
The number of goals the away team scored.
result
my $result = $match->result;
This is the result in 2-1 type form.
date
my Time::Piece $date = $match->date;
This is the date of the match as a Time::Piece object.
ADDITIONAL INFO
soccerdata data format
The data supplied by soccerdata is in the form:
1,2,3,4,5,6,7
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)
TODO
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.
BUGS
Craig McLaughlan has a lot to answer for. Mona, mostly.
SHOWING YOUR APPRECIATION
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!)
SEE ALSO
http://www.soccerdata.com
AUTHOR
Stray Toaster, <coder@stray-toaster.co.uk>
COPYRIGHT AND LICENSE
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.