| 1 | # -*- cperl; cperl-indent-level: 4 -*- | ||
| 2 | package WWW::NOS::Open::AudioFragment 0.100; | ||
| 3 | 5 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 5 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 5 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 5 | ▶ | use 5.014000; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 5 | ▶ | use Moose qw/extends/; |
|
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 | extends 'WWW::NOS::Open::MediaResource'; | |
| 13 | |||
| 14 | 5 | ▶ | no Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | ## no critic qw(RequireExplicitInclusion) | ||
| 17 | 5 | __PACKAGE__->meta->make_immutable; | |
| 18 | ## use critic | ||
| 19 | |||
| 20 | 5 | 1; | |
| 21 | |||
| 22 | __END__ | ||
| 23 | |||
| 24 | =encoding utf8 | ||
| 25 | |||
| 26 | =head1 NAME | ||
| 27 | |||
| 28 | WWW::NOS::Open::AudioFragment - client side audio fragment. | ||
| 29 | |||
| 30 | =head1 VERSION | ||
| 31 | |||
| 32 | This document describes WWW::NOS::Open::AudioFragment version 0.100. | ||
| 33 | |||
| 34 | =head1 SYNOPSIS | ||
| 35 | |||
| 36 | use WWW::NOS::Open::AudioFragment; | ||
| 37 | |||
| 38 | =head1 DESCRIPTION | ||
| 39 | |||
| 40 | This class represents an audio fragment as returned in the latest ten audio | ||
| 41 | fragments list. | ||
| 42 | |||
| 43 | =head1 SUBROUTINES/METHODS | ||
| 44 | |||
| 45 | =head2 C<new> | ||
| 46 | |||
| 47 | Create a new audio fragment object. | ||
| 48 | |||
| 49 | =over | ||
| 50 | |||
| 51 | =item 1. A hash containing the properties and their values. | ||
| 52 | |||
| 53 | =back | ||
| 54 | |||
| 55 | =head2 C<get_id> | ||
| 56 | |||
| 57 | Returns the id of the audio fragment as integer. | ||
| 58 | |||
| 59 | =head2 C<get_title> | ||
| 60 | |||
| 61 | Returns the title of the audio fragment as string. | ||
| 62 | |||
| 63 | =head2 C<get_description> | ||
| 64 | |||
| 65 | Returns the description of the audio fragment as string. | ||
| 66 | |||
| 67 | =head2 C<get_published> | ||
| 68 | |||
| 69 | Returns the publishing date of the audio fragment as a L<DateTime|DateTime> | ||
| 70 | object. | ||
| 71 | |||
| 72 | =head2 C<get_last_update> | ||
| 73 | |||
| 74 | Returns the date of the last update for the audio fragment as a | ||
| 75 | L<DateTime|DateTime> object. | ||
| 76 | |||
| 77 | =head2 C<get_thumbnail_xs> | ||
| 78 | |||
| 79 | Returns the URL of the extra small thumbnail for the audio fragment as an | ||
| 80 | L<URI|URI> object. | ||
| 81 | |||
| 82 | =head2 C<get_thumbnail_s> | ||
| 83 | |||
| 84 | Returns the URL of the small thumbnail for the audio fragment as an L<URI|URI> | ||
| 85 | object. | ||
| 86 | |||
| 87 | =head2 C<get_thumbnail_m> | ||
| 88 | |||
| 89 | Returns the URL of the medium sized thumbnail for the audio fragment as an | ||
| 90 | L<URI|URI> object. | ||
| 91 | |||
| 92 | =head2 C<get_link> | ||
| 93 | |||
| 94 | Returns the URL of the main audio fragment as an L<URI|URI> object. | ||
| 95 | |||
| 96 | =head2 C<get_embed_code> | ||
| 97 | |||
| 98 | Return the HTML code to embed the audio fragment in an HTML page. | ||
| 99 | |||
| 100 | =head2 C<get_keywords> | ||
| 101 | |||
| 102 | Returns the list of keywords for the audio fragment as a reference to an array | ||
| 103 | of strings. | ||
| 104 | |||
| 105 | =head1 CONFIGURATION AND ENVIRONMENT | ||
| 106 | |||
| 107 | =head1 DEPENDENCIES | ||
| 108 | |||
| 109 | =over 4 | ||
| 110 | |||
| 111 | =item * L<Moose|Moose> | ||
| 112 | |||
| 113 | =item * L<namespace::autoclean|namespace::autoclean> | ||
| 114 | |||
| 115 | =item * L<WWW::NOS::Open::MediaResource|WWW::NOS::Open::MediaResource> | ||
| 116 | |||
| 117 | =back | ||
| 118 | |||
| 119 | =head1 INCOMPATIBILITIES | ||
| 120 | |||
| 121 | =head1 DIAGNOSTICS | ||
| 122 | |||
| 123 | =head1 BUGS AND LIMITATIONS | ||
| 124 | |||
| 125 | Please report any bugs or feature requests at | ||
| 126 | L<RT for rt.cpan.org|https://rt.cpan.org/Dist/Display.html?Queue=WWW-NOS-Open>. | ||
| 127 | |||
| 128 | =head1 AUTHOR | ||
| 129 | |||
| 130 | Roland van Ipenburg, E<lt>ipenburg@xs4all.nlE<gt> | ||
| 131 | |||
| 132 | =head1 LICENSE AND COPYRIGHT | ||
| 133 | |||
| 134 | Copyright 2012 by Roland van Ipenburg | ||
| 135 | |||
| 136 | This library is free software; you can redistribute it and/or modify | ||
| 137 | it under the same terms as Perl itself, either Perl version 5.14.0 or, | ||
| 138 | at your option, any later version of Perl 5 you may have available. | ||
| 139 | |||
| 140 | =head1 DISCLAIMER OF WARRANTY | ||
| 141 | |||
| 142 | BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY | ||
| 143 | FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN | ||
| 144 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES | ||
| 145 | PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 146 | EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
| 147 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE | ||
| 148 | ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH | ||
| 149 | YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL | ||
| 150 | NECESSARY SERVICING, REPAIR, OR CORRECTION. | ||
| 151 | |||
| 152 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | ||
| 153 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR | ||
| 154 | REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE | ||
| 155 | LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, | ||
| 156 | OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE | ||
| 157 | THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING | ||
| 158 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A | ||
| 159 | FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF | ||
| 160 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF | ||
| 161 | SUCH DAMAGES. | ||
| 162 | |||
| 163 | =cut | ||