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