| Chess-PGN-Parse-FileHandle documentation | view source | Contained in the Chess-PGN-Parse-FileHandle distribution. |
Chess::PGN::Parse::FileHandle - Parse PGN from a FileHandle
Version 0.02
use Chess::PGN::Parse::FileHandle;
# read from a gzip'ed file with gunzipping first
open my $pgn_gz, "<:gzip", "my_pgns.pgn.gz" or die $!;
my $pgn = Chess::PGN::Parse::FileHandle->new($pgn_gz);
while ($pgn->read_game()) {
# Process the file like you would with Chess::PGN::Parse
...
}
After getting tired of having to repeatedly gzip and gunzip PGN
files to process through Chess::PGN::Parse, I decided there had to
be an easier way. Well, this is it. This module is simple subclass
of Chess::PGN::Parse that allows FILECHANDLEs as a parameter.
Returns a new Chess::PGN::Parse::FileHandle object, ready to read from
FILEHANDLE.
The remaining methods of this class are inherited directly from
Chess::PGN::Parse.
This is a naughty module that peeks at the internals of another module.
It could easily break if changes are made to Chess::PGN::Parse.
Steve Peters, <steve@fisharerojo.org>
Please report any bugs or feature requests to
bug-chess-pgn-parse-filehandle@rt.cpan.org, or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Chess-PGN-Parse-FileHandle.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
Giuseppe Maxia for Chess::PGN::Parse
Copyright 2005 Steve Peters, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Chess-PGN-Parse-FileHandle documentation | view source | Contained in the Chess-PGN-Parse-FileHandle distribution. |