| Games-Risk documentation | Contained in the Games-Risk distribution. |
Games::Risk::Card - map card
version 3.103040
my $card = Games::Risk::Card->new(\%params);
This module implements a map card, with all its characteristics.
Create a new card. Mandatory param is type, and there's an optional
param country.
The following accessors (acting as mutators, ie getters and setters) are
available for Games::Risk::Card objects:
country corresponding to the card.
the type of the card: artillery, cavalry, infantery or
wildcard
Remove all circular references of $card, to prevent memory leaks.
Jerome Quelin
This software is Copyright (c) 2008 by Jerome Quelin.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
| Games-Risk documentation | Contained in the Games-Risk distribution. |
# # This file is part of Games-Risk # # This software is Copyright (c) 2008 by Jerome Quelin. # # This is free software, licensed under: # # The GNU General Public License, Version 3, June 2007 # use 5.010; use strict; use warnings; package Games::Risk::Card; BEGIN { $Games::Risk::Card::VERSION = '3.103040'; } # ABSTRACT: map card use base qw{ Class::Accessor::Fast }; __PACKAGE__->mk_accessors( qw{ country type } ); #-- # METHODS # -- public methods # # $card->destroy; # # Remove all circular references of $card, to prevent memory leaks. # #sub DESTROY { say "destroy: $_[0]"; } sub destroy { my ($self) = @_; $self->country(undef); } 1;
__END__