blib/lib/WWW/NOS/Open/DayGuide.pm

filter: Statementstmt 100% 35 / 35 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 10 / 10 Podpod n/a totaltotal 100% 45 / 45 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/WWW/NOS/Open/Broadcast.pm ↑ Summary blib/lib/WWW/NOS/Open/Document.pm »
1 package WWW::NOS::Open::DayGuide v1.0.3; # -*- cperl; cperl-indent-level: 4 -*-
2 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 5 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use 5.014000;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 5 ▶use Moose qw/around has with/;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 5 ▶use Moose::Util::TypeConstraints qw/enum/;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 5 ▶use namespace::autoclean '-also' => qr/^__/sxm;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 5 ▶use WWW::NOS::Open::TypeDef qw(NOSDateTime NOSURI);
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 5 ▶use Readonly;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 5 Readonly::Array my @GUIDE_TYPES => qw(tv radio);
16  
17 5 has '_type' => (
18 'is' => 'ro',
19 'isa' => enum( [@GUIDE_TYPES] ),
20 'reader' => 'get_type',
21 'init_arg' => 'type',
22 );
23  
24 5 has '_date' => (
25 'is' => 'ro',
26 'isa' => NOSDateTime,
27 'coerce' => 1,
28 'reader' => 'get_date',
29 'init_arg' => 'date',
30 );
31  
32 5 has '_broadcasts' => (
33 'is' => 'ro',
34 'isa' => 'ArrayRef[WWW::NOS::Open::Broadcast]',
35 'reader' => 'get_broadcasts',
36 'init_arg' => 'broadcasts',
37 );
38  
39 5 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
40  
41 5 __PACKAGE__->meta->make_immutable;
42  
43 5 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 v1.0.3.
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
« blib/lib/WWW/NOS/Open/Broadcast.pm ↑ Summary blib/lib/WWW/NOS/Open/Document.pm »