line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::Mitey::Cards::Card::Face; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.016'; |
4
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
1087
|
use Acme::Mitey::Cards::Mite qw( -all ); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
46
|
|
7
|
4
|
|
|
4
|
|
25
|
use Acme::Mitey::Cards::Types qw( :types ); |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
1509
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
extends 'Acme::Mitey::Cards::Card'; |
10
|
|
|
|
|
|
|
|
11
|
4
|
|
|
4
|
|
521
|
use Acme::Mitey::Cards::Suit; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
654
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
has suit => ( |
14
|
|
|
|
|
|
|
is => ro, |
15
|
|
|
|
|
|
|
isa => Suit, |
16
|
|
|
|
|
|
|
required => true, |
17
|
|
|
|
|
|
|
coerce => true, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has face => ( |
21
|
|
|
|
|
|
|
is => ro, |
22
|
|
|
|
|
|
|
isa => Character, |
23
|
|
|
|
|
|
|
required => true, |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
signature_for face_abbreviation => ( |
27
|
|
|
|
|
|
|
pos => [], |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub face_abbreviation { |
31
|
|
|
|
|
|
|
my $self = shift; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
return substr( $self->face, 0, 1 ); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
signature_for '+to_string'; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub to_string { |
39
|
|
|
|
|
|
|
my $self = shift; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
return sprintf( '%s%s', $self->face_abbreviation, $self->suit->abbreviation ); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |