summaryrefslogtreecommitdiffstats
path: root/lib/Bot/Games/Game.pm
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2008-12-18 02:55:57 -0500
committerdoy <doy@tozt.net>2008-12-18 02:55:57 -0500
commitc3af320e4ab2517c6c3fd99cd9bcac6ae17107dd (patch)
tree349e1e6b80936091badb789e0514e271403b15aa /lib/Bot/Games/Game.pm
parentfabb42b48cbd9018dc62abde829e5c385d20d037 (diff)
downloadbot-games-c3af320e4ab2517c6c3fd99cd9bcac6ae17107dd.tar.gz
bot-games-c3af320e4ab2517c6c3fd99cd9bcac6ae17107dd.zip
convert ->players over to use the Collection::Array attribute helper
Diffstat (limited to 'lib/Bot/Games/Game.pm')
-rw-r--r--lib/Bot/Games/Game.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Bot/Games/Game.pm b/lib/Bot/Games/Game.pm
index 519eddc..24e93a5 100644
--- a/lib/Bot/Games/Game.pm
+++ b/lib/Bot/Games/Game.pm
@@ -1,13 +1,19 @@
#!/usr/bin/perl
package Bot::Games::Game;
use Moose;
+use MooseX::AttributeHelpers;
use DateTime;
has players => (
+ metaclass => 'Collection::Array',
is => 'rw',
isa => 'ArrayRef[Str]',
auto_deref => 1,
default => sub { [] },
+ provides => {
+ push => '_add_player',
+ count => 'num_players',
+ },
);
has start_time => (