File Coverage

blib/lib/WWW/NOS/Open/DayGuide.pm
Criterion Covered Total %
statement 29 29 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod n/a
total 39 39 100.0


line stmt bran cond sub pod time code
1             package WWW::NOS::Open::DayGuide 0.101; # -*- cperl; cperl-indent-level: 4 -*-
2 5     5   33 use strict;
  5         10  
  5         145  
3 5     5   25 use warnings;
  5         12  
  5         145  
4              
5 5     5   25 use utf8;
  5         11  
  5         37  
6 5     5   166 use 5.014000;
  5         18  
7              
8 5     5   25 use Moose qw/around has with/;
  5         12  
  5         38  
9 5     5   25876 use Moose::Util::TypeConstraints qw/enum/;
  5         12  
  5         48  
10 5     5   2196 use namespace::autoclean '-also' => qr/^__/sxm;
  5         11  
  5         66  
11              
12 5     5   447 use WWW::NOS::Open::TypeDef qw(NOSDateTime NOSURI);
  5         12  
  5         51  
13              
14 5     5   6909 use Readonly;
  5         13  
  5         606  
15             Readonly::Array my @GUIDE_TYPES => qw(tv radio);
16              
17             has '_type' => (
18             'is' => 'ro',
19             'isa' => enum( [@GUIDE_TYPES] ),
20             'reader' => 'get_type',
21             'init_arg' => 'type',
22             );
23              
24             has '_date' => (
25             'is' => 'ro',
26             'isa' => NOSDateTime,
27             'coerce' => 1,
28             'reader' => 'get_date',
29             'init_arg' => 'date',
30             );
31              
32             has '_broadcasts' => (
33             'is' => 'ro',
34             'isa' => 'ArrayRef[WWW::NOS::Open::Broadcast]',
35             'reader' => 'get_broadcasts',
36             'init_arg' => 'broadcasts',
37             );
38              
39 5     5   31 no Moose;
  5         12  
  5         27  
40              
41             __PACKAGE__->meta->make_immutable;
42              
43             1;
44              
45             __END__
46              
47             =encoding utf8
48              
49             =for stopwords DateTime Ipenburg MERCHANTABILITY
50              
51             =head1 NAME
52              
53             WWW::NOS::Open::DayGuide - client side television or radio program guide
54              
55             =head1 VERSION
56              
57             This document describes WWW::NOS::Open::DayGuide version 0.101.
58              
59             =head1 SYNOPSIS
60              
61             use WWW::NOS::Open::DayGuide;
62              
63             =head1 DESCRIPTION
64              
65             This class represents a guide containing the broadcasts for a day as returned
66             in the television and radio guide list for one or several days.
67              
68             =head1 SUBROUTINES/METHODS
69              
70             =head2 C<new>
71              
72             Create a new WWW::NOS::Open::DayGuide object.
73              
74             =over
75              
76             =item 1. A hash containing the properties and their values.
77              
78             =back
79              
80             =head2 C<get_type>
81              
82             Returns the type of the guide as string C<tv> or C<radio>.
83              
84             =head2 C<get_date>
85              
86             Returns the date of the guide as L<DateTime|DateTime> object.
87              
88             =head2 C<get_broadcasts>
89              
90             Returns the broadcasts for that day as a reference to an array of
91             L<WWW::NOS::Open::Broadcast|WWW::NOS::Open::Broadcast> objects.
92              
93             =head1 CONFIGURATION AND ENVIRONMENT
94              
95             =head1 DEPENDENCIES
96              
97             =over 4
98              
99             =item * L<Moose|Moose>
100              
101             =item * L<Moose::Util::TypeConstraints|Moose::Util::TypeConstraints>
102              
103             =item * L<namespace::autoclean|namespace::autoclean>
104              
105             =back
106              
107             =head1 INCOMPATIBILITIES
108              
109             =head1 DIAGNOSTICS
110              
111             =head1 BUGS AND LIMITATIONS
112              
113             Please report any bugs or feature requests at
114             L<RT for rt.cpan.org|https://rt.cpan.org/Dist/Display.html?Queue=WWW-NOS-Open>.
115              
116             =head1 AUTHOR
117              
118             Roland van Ipenburg, E<lt>ipenburg@xs4all.nlE<gt>
119              
120             =head1 LICENSE AND COPYRIGHT
121              
122             Copyright 2012 by Roland van Ipenburg
123              
124             This library is free software; you can redistribute it and/or modify
125             it under the same terms as Perl itself, either Perl version 5.14.0 or,
126             at your option, any later version of Perl 5 you may have available.
127              
128             =head1 DISCLAIMER OF WARRANTY
129              
130             BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
131             FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
132             OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
133             PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
134             EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
135             WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
136             ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
137             YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
138             NECESSARY SERVICING, REPAIR, OR CORRECTION.
139              
140             IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
141             WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
142             REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE
143             LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
144             OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
145             THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
146             RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
147             FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
148             SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
149             SUCH DAMAGES.
150              
151             =cut