Chess-PGN-Extract

 view release on metacpan or  search on metacpan

lib/Chess/PGN/Extract/Stream.pm  view on Meta::CPAN


  croak ("'new' requires a PGN file name")
    unless defined $pgn_file;

  my $self = {};
  $self->{pgn_file} = $pgn_file;
  open my $pgn_handle, '<', $pgn_file
    or croak ("Cannot open PGN file: \"$pgn_file\"");
  $self->{pgn_handle} = $pgn_handle;

  bless $self => $class;
}

sub pgn_file { $_[0]->{pgn_file} }

sub read_game {
  ( $_[0]->read_games (1) )[0];
}

sub read_games {
  my $self = shift;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.432 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )