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.
gzip
gunzip
Chess::PGN::Parse
FILECHANDLE
Returns a new Chess::PGN::Parse::FileHandle object, ready to read from FILEHANDLE.
Chess::PGN::Parse::FileHandle
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>
<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.
bug-chess-pgn-parse-filehandle@rt.cpan.org
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.
To install Chess::PGN::Parse::FileHandle, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Chess::PGN::Parse::FileHandle
CPAN shell
perl -MCPAN -e shell install Chess::PGN::Parse::FileHandle
For more information on module installation, please visit the detailed CPAN module installation guide.