NAME

Games::Go::AGA::Parse - parsers for various AGA format files

VERSION

version 0.042

SYNOPSIS

use Games::Go::AGA::Parse::TDList;
use Games::Go::AGA::Parse::Register;
use Games::Go::AGA::Parse::Round;

DESCRIPTION

Base class parsers for for various American Go Association (AGA) file formats. Do not use this module directly, but instead use one of the format parsers:

Games::Go::AGA::Parse::TDList parses the list of AGA members (available from <http://usgo.org/ratings>).

Games::Go::AGA::Parse::Register parses a register.tde file which is the player entry file for a go tournament.

Games::Go::AGA::Parse::Round parses 1.tde, 2.tde, etc files which are the files containing round pairing and results information.

These parsers are all line-oriented. Accordingly, they provide a parse_line method which expects a single line of input optionally terminated with an End of Line. parse is aliased to parse_line.

In order to improve error messages produced when exceptions are thrown, you can pass a 'filename' and a 'handle' option in the ->new calls. Alternatively, you can wrap the calls to ->parse_line in an eval block and handle any exceptions explicitly:

eval {
    $parser->parse_line($line);
};
if (my $x = Exception::Class->caught('Games::Go::AGA::Parse::Exception')) {
    # $x is a Games::Go::AGA::Parse::Exception object
}
elsif ($@) {
    # $@ is a normal perl error string
}

SEE ALSO

Games::Go::AGA::Parse::TDList
Games::Go::AGA::Parse::Register
Games::Go::AGA::Parse::Round
Class::Exception
Games::Go::AGA::Parse::Exceptions

AUTHOR

Reid Augustin <reid@hellosix.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Reid Augustin.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.