| 1 | # $Id$ | ||||||||||
| 2 | |||||||||||
| 3 | package XML::Atom::Entry; | ||||||||||
| 4 | 19 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 19 | ▶ | use XML::Atom; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 19 | ▶ | use base qw( XML::Atom::Thing ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 19 | ▶ | use MIME::Base64 qw( encode_base64 decode_base64 ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 19 | ▶ | use XML::Atom::Person; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 19 | ▶ | use XML::Atom::Content; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 19 | ▶ | use XML::Atom::Util qw( first ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 12 | ▶ | sub element_name { 'entry' } | ||||||||
|
Subroutine
element_name: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 14 | |||||||||||
| 15 | 32 | ▶ | sub content { | ||||||||
|
Subroutine
content: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 16 | 32 | my $entry = shift; | |||||||||
| 17 | 32 | ▶ | if (my @arg = @_) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | 9 | ▶ | if (ref($arg[0]) ne 'XML::Atom::Content') { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | 9 | $arg[0] = XML::Atom::Content->new(Body => $arg[0], Version => $entry->version); | |||||||||
| 20 | } | ||||||||||
| 21 | 9 | $entry->set($entry->ns, 'content', @arg); | |||||||||
| 22 | } else { | ||||||||||
| 23 | 23 | return $entry->get_object($entry->ns, 'content', 'XML::Atom::Content'); | |||||||||
| 24 | } | ||||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 19 | __PACKAGE__->mk_elem_accessors(qw( summary )); | |||||||||
| 28 | 19 | __PACKAGE__->mk_xml_attr_accessors(qw( lang base )); | |||||||||
| 29 | |||||||||||
| 30 | 19 | __PACKAGE__->_rename_elements('issued' => 'published'); | |||||||||
| 31 | 19 | __PACKAGE__->_rename_elements('modified' => 'updated'); | |||||||||
| 32 | |||||||||||
| 33 | # OMG 0.3 elements ... to be backward compatible | ||||||||||
| 34 | 19 | __PACKAGE__->mk_elem_accessors(qw( created )); | |||||||||
| 35 | |||||||||||
| 36 | 19 | __PACKAGE__->mk_object_accessor( source => 'XML::Atom::Feed' ); | |||||||||
| 37 | |||||||||||
| 38 | 19 | 1; | |||||||||
| 39 | __END__ | ||||||||||