The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Sport::Analytics::NHL::Report::PL - Class for the Boxscore HTML PBP report

SYNOPSYS

Class for the Boxscore HTML PBP report.Should not be constructed directly, but via Sport::Analytics::NHL::Report (q.v.) As with any other HTML report, there are two types: old (pre-2007) and new (2007 and on). Parsers of them may have something in common but may turn out to be completely different more often than not.

This module is the heaviest one of the reports due to vast amounts of data and poor structure of the document. Handle with care.

METHODS

add_game_end

Adds a missing GEND event to a game.

 Arguments: none
 Returns: void. The object is manipulated from within.
cleanup_old_event

Removes extra white spaces from old event's properties

 Arguments: the event
 Returns: void. The event is altered.
configure_old_events

Adds on-ice information to certain broken-format old goal events.

 Arguments: none
 Returns: void. The events arrayref in the
  object is manipulated from within.
fill_broken_events

Finds the events in the boxscore that were explicitly marked as broken and corrects them with the manual data.

 Arguments: none
 Returns: void. The events arrayref in the
  object is manipulated from within.
fill_event_values

Fills the event with derived values from the boxscore object (e.g. season, stage)

 Arguments: the event
 Returns: void. The event is altered.
fix_old_event_type

Applies additional processing to the event from an old report. Arguments: the event Returns: void. The event is altered.

fix_old_line

Makes the best attempt to fix the broken lines in the old reports, including known typos.

 Arguments: the line
 Returns: void. The event is altered.
normalize

Cleans, standardizes and provides default values to events after the parsing.

 Arguments: none
 Returns: void. The events arrayref in the
  object is manipulated from within.
parse

Wrapper dispatching the actual parsing either to read_playbyplay (q.v.) or read_playbyplay_old (q.v.) depending on the type of the report.

 Arguments: none
 Returns: void.
parse_description

Parses the description of the event of the new report for specific information.

 Arguments: the event
 Returns: void. The event is altered.
parse_description_old

Parses the description of the event of the old report for specific information.

 Arguments: the event
 Returns: void. The event is altered.
parse_on_ice

Parses the on-ice information of the event of the new report.

 Arguments: the event
 Returns: void. The event is altered.
parse_penalty

Parses the penalty event of the new report which requires its own function due to complexity of the matching regexp.

 Arguments: the event
 Returns: void. The event is altered.
parse_penalty_old

Parses the penalty event of the old report which requires its own function due to complexity of the matching regexp.

 Arguments: the event
 Returns: void. The event is altered.
read_event

Reads the event from the event table row of the new report.

 Arguments: the row HTML element
 Returns: the read event.
read_old_block

Reads the consecutive block of event lines of the old report.

 Arguments:
 * the block of HTML elements containing the lines.
 * the number of the block
 * the adjustment flag (due to poor structure)
 Returns: the array of lines with the events
read_old_line

Reads a line of the old report and parses it into the event.

 Argument: the line of text.
 Returns: the event.
read_old_on_ice

Reads the on-ice information of the old report event (goals only)

 Arguments: the line with the information
 Returns: void. The event is updated within the object.
read_playbyplay

Actually parses the new report

 Arguments: none
 Returns: void. It's all in $self.
read_playbyplay_old

Actually parses the old report

 Arguments: none
 Returns: void. It's all in $self.
skip_event

Flags if the event is out of place and should be skipped.

 Argument: the event
 Returns: 1 if the event should be skipped, 0 if not.

AUTHOR

More Hockey Stats, <contact at morehockeystats.com>

BUGS

Please report any bugs or feature requests to contact at morehockeystats.com, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Sport::Analytics::NHL::Report::PL. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Sport::Analytics::NHL::Report::PL

You can also look for information at: