Roman M. Parparov > Chess-FIDE-1.22 > Chess::FIDE::Player

Download:
Chess-FIDE-1.22.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 1.22   Source  

NAME ^

Chess::FIDE::Player - Parse player data from FIDE Rating List.

SYNOPSIS ^

  use Chess::FIDE::Player;
  my $player = Chess::FIDE::Player->new(%param);
  print $player->id() . "\n";
  $player->value('field');

DESCRIPTION ^

Chess::FIDE::Player - Parse player data from FIDE Rating List. FIDE is the International Chess Federation that every month of the year releases a list of its rated members. The list contains about five hundred thousand entries. This module provides means of translation of every entry into a perl object containing all the fields.

METHODS

new /Constructor/

$player = Chess::FIDE::Player->new(%param);

The constructor creates a hash reference, blesses it and fills it with parameters passed in %param. The parameters should be fields corresponding to %FIDE_defaults (see section 'EXPORT'). If a field is not defined, a default value contained in %FIDE_defaults is used.

<AUTOLOAD>
 $player->property_name();
 $player->property_name($value);

Property names of the object are autoloaded into available methods.

First one retrieves a field in the $player object. If the field is not valid (i.e. not contained in %FIDE_defaults, an undef is returned. Second one sets the field to $value, and again in case of an invalid field undef is returned. Otherwise the new value of the field is returned.

EXPORT

%FIDE_defaults
 - hash of valid fields for the Player object and their default values.

SEE ALSO ^

Chess::FIDE http://www.fide.com

AUTHOR ^

Roman M. Parparov, <romm@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2004-2015 by Roman M. Parparov

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available.

Fide Rating List is Copyright (C) by the International Chess Federation http://www.fide.com

syntax highlighting: