File Coverage

blib/lib/Poker/Card.pm
Criterion Covered Total %
statement 9 11 81.8
branch n/a
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 12 16 75.0


line stmt bran cond sub pod time code
1             package Poker::Card;
2 1     1   5892 use strict;
  1         2  
  1         30  
3 1     1   5 use warnings FATAL => 'all';
  1         2  
  1         37  
4 1     1   5 use Moo;
  1         2  
  1         7  
5              
6             =head1 NAME
7              
8             Poker::Card - Simple class to represent a poker card.
9              
10             =head1 VERSION
11              
12             Version 0.01
13              
14             =cut
15              
16             our $VERSION = '0.01';
17              
18              
19             =head1 SYNOPSIS
20              
21             This class is used internally by Poker::Deck. You probably don't want to use it directly. Attributes include rank, suit, up_flag, and wild_flag.
22              
23             =cut;
24              
25             has 'suit' => (
26             is => 'rw',
27             );
28              
29             has 'rank' => (
30             is => 'rw',
31             );
32              
33             has 'id' => (
34             is => 'rw',
35             );
36              
37             has 'up_flag' => (
38             is => 'rw',
39             );
40              
41             has 'wild_flag' => (
42             is => 'rw',
43             clearer => 1,
44             predicate => 'is_wild',
45             );
46              
47             sub clone {
48 0     0 0   my $self = shift;
49 0           bless { %$self, @_ }, ref $self;
50             }
51              
52             =head1 AUTHOR
53              
54             Nathaniel Graham, C<< >>
55              
56             =head1 LICENSE AND COPYRIGHT
57              
58             Copyright 2016 Nathaniel Graham.
59              
60             This program is free software; you can redistribute it and/or modify it
61             under the terms of the the Artistic License (2.0). You may obtain a
62             copy of the full license at:
63              
64             L
65              
66             =cut
67              
68             1;