| Games-Pandemic documentation | Contained in the Games-Pandemic distribution. |
Games::Pandemic::Card::Special - base class for special pandemic event cards
version 1.111030
This package is the base class for all special event cards in Games::Pandemic. Nothing really interesting, check the subclasses instead.
Return the special card name, from CamelCaseName to
camel_case_name. This will be used as the event name sent to
main window.
Eg, Games::Pandemic::Card::Special::OneQuietNight objects will return
one_quiet_night.
Jerome Quelin
This software is Copyright (c) 2009 by Jerome Quelin.
This is free software, licensed under:
The GNU General Public License, Version 2, June 1991
| Games-Pandemic documentation | Contained in the Games-Pandemic distribution. |
# # This file is part of Games-Pandemic # # This software is Copyright (c) 2009 by Jerome Quelin. # # This is free software, licensed under: # # The GNU General Public License, Version 2, June 1991 # use 5.010; use strict; use warnings; package Games::Pandemic::Card::Special; BEGIN { $Games::Pandemic::Card::Special::VERSION = '1.111030'; } # ABSTRACT: base class for special pandemic event cards use Moose; use MooseX::SemiAffordanceAccessor; extends 'Games::Pandemic::Card'; has description => ( is => 'ro', isa => 'Str', lazy_build => 1 ); # -- public methods sub event { my $self = shift; my $ref = ref $self; $ref =~ s/^Games::Pandemic::Card::Special:://; $ref =~ s/([[:upper:]])/_$1/g; $ref =~ s/^_//; return lc $ref; } no Moose; __PACKAGE__->meta->make_immutable; 1;
__END__