NAME
Chess::Plisco::EPD - EPD parser for Chess::Plisco
SYNOPSIS
use Chess::Plisco::EPD(:all);
$epd = Chess::Plisco::EPD->new(
"1b1B4/8/8/4N2k/1p4n1/5KR1/8/3N4 w - - bm Rh3#;\n",
. "3R3K/8/5Q2/8/5N2/1B6/2PB4/1qbk4 w - - bm Qa1;\n"
);
$epd = Chess::Plisco::EPD->new([
"1b1B4/8/8/4N2k/1p4n1/5KR1/8/3N4 w - - bm Rh3#;\n",
"3R3K/8/5Q2/8/5N2/1B6/2PB4/1qbk4 w - - bm Qa1;\n",
]);
$epd = Chess::Plisco::EPD->new('bratko-kopec.epd');
open $fh, '<', 'bratko-kopec.epd';
$epd = Chess::Plisco::EPD->new($fh);
DESCRIPTION
Chess::Plisco::EPD can parse EPDs from strings or files.
CONSTRUCTOR
- new(STRING|ARRAYREF|FILENAME|FILEHANDLE[, OPTIONS])
-
You can instantiate the parser either with EPD data from a string, from an array reference holding individual lines, from a named file or from a file handle that is open for reading.
The optional hash parameter OPTIONS has been introduced in version 0.8.0. The following options are defined:
- filename
-
Overrides the filename. This makes sense when you do not pass a filename as the input source.
- pseudo_legal
-
If it has a truthy value, a lot of legality checks are disabled.
METHODS
- records
-
Returns all found records as Chess::Plisco::EPD::Record objects.
COPYRIGHT
Copyright (C) 2021-2025 Guido Flohr <guido.flohr@cantanea.com>.
SEE ALSO
Chess::Plisco::EPD::Record, perl(1)