Media/Base.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 20 / 20 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Media.pm ↑ Summary
1 package XML::Atom::Ext::Media::Base;
2 2 our $VERSION = '0.092840';
3  
4  
5 #ABSTRACT: Stuff shared between group and content
6  
7 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 ▶use base qw( XML::Atom::Base );
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12  
13 2 __PACKAGE__->mk_elem_accessors(qw(title description keywords));
14  
15  
16 2 __PACKAGE__->mk_object_list_accessor(
17 thumbnail => 'XML::Atom::Ext::Media::Thumbnail', 'thumbnails',
18 );
19  
20  
21 2 __PACKAGE__->mk_object_list_accessor(
22 'category' => 'XML::Atom::Category', 'categories'
23 );
24  
25  
26 4 ▶sub element_ns {
Subroutine element_ns: called CC=1 SCAR=0.0
Pod documented
27 4 return XML::Atom::Ext::Media->element_ns;
28 }
29  
30  
31 2 1;
32  
33  
34  
35 =pod
36  
37 =head1 NAME
38  
39 XML::Atom::Ext::Media::Base - Stuff shared between group and content
40  
41 =head1 VERSION
42  
43 version 0.092840
44  
45 =head1 CLASSES THAT INHERIT US
46  
47 =over
48  
49 =item * L<XML::Atom::Ext::Media::Group>
50  
51 =item * L<XML::Atom::Ext::Media::Content>
52  
53 =back
54  
55 =cut
56 =head1 ATTRIBUTES
57  
58 =head2 title
59  
60 Returns the title for a <media:group> or <media:content>
61  
62 =head2 description
63  
64 Returns the description for a <media:group> or <media:content>
65  
66 =head2 keywords
67  
68 Returns the keywords string for a <media:group> or <media:content>
69  
70  
71  
72 =head2 thumbnail
73  
74 In SCALAR context it returns the first <media:thumbnail> we find in
75 this <media:group> or <media:content>.
76  
77 In LIST context it will return all of them.
78  
79 =head2 thumbnails
80  
81 Like L<thumbnail>, but will in SCALAR context return an arrayref.
82  
83  
84  
85 =head2 category
86  
87 Will in SCALAR context return the first <media:category> as an
88 L<XML::Atom::Category>, and will in LIST context return an array
89 of all such objects.
90  
91 =head2 categories
92  
93 Will return an ARRAYREF in SCALAR context, otherwise like L<category>
94  
95  
96  
97 =head2 element_ns
98  
99 Returns the namescpare for this node, the same as for
100 L<XML::Atom::Ext::Media/element_ns>.
101  
102 =head2 element_name
103  
104 Implemented in the subclasses.
105  
106 Returns the name of the namespaced element we represent, like group for <media:group>
107  
108  
109  
110 =head1 AUTHOR
111  
112 Andreas Marienborg <andremar@cpan.org>
113  
114 =head1 COPYRIGHT AND LICENSE
115  
116 This software is copyright (c) 2009 by Andreas Marienborg.
117  
118 This is free software; you can redistribute it and/or modify it under
119 the same terms as the Perl 5 programming language system itself.
120  
121 =cut
122  
123  
124  
125 __END__
« Media.pm ↑ Summary