MooseX::Singleton;

A game - the main class or the board is a singleton

Configuration

Database access

examples/Moose/singleton/t/01-space.t
use strict;
use warnings;

use Test::More;
plan tests => 2;

use Games::Spacefight;

my $game = Games::Spacefight->new;
isa_ok($game, 'Games::Spacefight');

my $game2 = Games::Spacefight->new;
is $game2, $game, 'Singleton';


examples/Moose/singleton/lib/Games/Spacefight.pm
package Games::Spacefight;
use Moose;
use MooseX::Singleton;

1;