File Coverage

blib/lib/WWW/ArsenalFC/TicketInformation/Match/Availability.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1 4     4   78231 use strict;
  4         8  
  4         179  
2 4     4   25 use warnings;
  4         8  
  4         528  
3              
4             package WWW::ArsenalFC::TicketInformation::Match::Availability;
5             {
6             $WWW::ArsenalFC::TicketInformation::Match::Availability::VERSION = '1.123160';
7             }
8              
9             # ABSTRACT: Represents the availability of a match ticket.
10              
11             use constant {
12              
13             # memberships
14 4         1396 GENERAL_SALE => 1,
15             RED => 2,
16             SILVER => 3,
17             GOLD => 4,
18             PLATINUM_GOLD => 5,
19             TRAVEL_CLUB => 6,
20              
21             # types
22             FOR_SALE => 1,
23             SCHEDULED => 2,
24 4     4   31 };
  4         12  
25              
26 4         33 use Object::Tiny qw{
27             date
28             memberships
29             type
30 4     4   5602 };
  4         2629  
31              
32             1;
33              
34              
35              
36             =pod
37              
38             =head1 NAME
39              
40             WWW::ArsenalFC::TicketInformation::Match::Availability - Represents the availability of a match ticket.
41              
42             =head1 VERSION
43              
44             version 1.123160
45              
46             =head1 ATTRIBUTES
47              
48             =head2 date
49              
50             The date the ticket becomes available, if scheduled for release.
51              
52             =head2 memberships
53              
54             An array of membership levels this availability applies too.
55              
56             =head2 type
57              
58             The type of availibility. I.e. is it scheduled for release or for sale.
59              
60             Use as follows:
61              
62             given ($availability->type) {
63             when (WWW::ArsenalFC::TicketInformation::Match::Availability->SCHEDULED) {...}
64             when (WWW::ArsenalFC::TicketInformation::Match::Availability->FOR_SALE) {...}
65             }
66              
67             Tip: If you don't like the long names, use L.
68              
69             =head1 AUTHOR
70              
71             Andrew Jones
72              
73             =head1 COPYRIGHT AND LICENSE
74              
75             This software is copyright (c) 2012 by Andrew Jones.
76              
77             This is free software; you can redistribute it and/or modify it under
78             the same terms as the Perl 5 programming language system itself.
79              
80             =cut
81              
82              
83             __END__