WWW::DaysOfWonder::Memoir44::DB::Scenarios - scenarios database
version 3.000
my $db = WWW::DaysOfWonder::Memoir44::DB::Scenarios->instance; $db->read; my @top_scenarios = $db->grep( sub { $_->rating == 3 } ); $db->clear; $db->add( @top_scenarios ); $db->write;
This class implements a singleton holding all the scenarios available. It is the core of the whole distribution.
my $db = WWW::DaysOfWonder::Memoir44::DB::Scenarios->instance; $db->add( @scenarios );
Store a new scenario in the scenarios database.
my $db = WWW::DaysOfWonder::Memoir44::DB::Scenarios->instance; $db->clear;
Remove all scenarios from the database.
my $db = WWW::DaysOfWonder::Memoir44::DB::Scenarios->read;
Read the whole scenarios database from a file. The file is internal to the distrib, and stored in a private directory.
my $db = WWW::DaysOfWonder::Memoir44::DB::Scenarios->instance; $db->write;
Store the whole scenarios database to a file. The file is internal to the distrib, and stored in a private directory.
Jerome Quelin
This software is copyright (c) 2009 by Jerome Quelin.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WWW::DaysOfWonder::Memoir44, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::DaysOfWonder::Memoir44
CPAN shell
perl -MCPAN -e shell install WWW::DaysOfWonder::Memoir44
For more information on module installation, please visit the detailed CPAN module installation guide.