| 1 | package XML::Feed::Format::hAtom; | ||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||
| 3 | 6 | ▶ | use strict; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 4 | 6 | ▶ | use base qw( XML::Feed ); | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 5 | 6 | ▶ | use Data::Microformat::hFeed; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 6 | 6 | ▶ | use Data::Microformat::hCard; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 7 | 6 | ▶ | use Data::Microformat::geo; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||
| 9 | 6 | our $VERSION = "0.5"; | |||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||
| 11 | 8 | ▶ | sub identify { | ||||||||||||||||||||||||||||||
|
Subroutine
identify: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 12 | 8 | my $class = shift; | |||||||||||||||||||||||||||||||
| 13 | 8 | my $xml = shift; | |||||||||||||||||||||||||||||||
| 14 | 8 | my $tag = $class->_get_first_tag($xml); | |||||||||||||||||||||||||||||||
| 15 | 8 | return ($tag eq 'html'); | |||||||||||||||||||||||||||||||
| 16 | } | ||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||
| 18 | 2 | ▶ | sub init_empty { | ||||||||||||||||||||||||||||||
|
Subroutine
init_empty: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 19 | 2 | my ($feed, %args) = @_; | |||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||
| 21 | 2 | $feed->{hatom} = Data::Microformat::hFeed->new(%args); | |||||||||||||||||||||||||||||||
| 22 | 2 | $feed; | |||||||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||
| 25 | 8 | ▶ | sub init_string { | ||||||||||||||||||||||||||||||
|
Subroutine
init_string: called CC=3 SCAR=11.2
Pod
documented
| |||||||||||||||||||||||||||||||||
| 26 | 8 | my $feed = shift; | |||||||||||||||||||||||||||||||
| 27 | 8 | my ($str) = @_; | |||||||||||||||||||||||||||||||
| 28 | 8 | ▶ | if ($str) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 29 | 8 | eval { $feed->{hatom} = Data::Microformat::hFeed->parse($str) }; | |||||||||||||||||||||||||||||||
| 30 | 8 | ▶ | return $feed->error($@) if $@; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||||||
| 32 | 8 | $feed; | |||||||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||
| 35 | 3 | ▶ | sub format { 'hAtom' } | ||||||||||||||||||||||||||||||
|
Subroutine
format: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||
| 37 | 5 | ▶ | sub tagline { shift->{hatom}->tagline(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
tagline: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 38 | 5 | ▶ | sub description { shift->{hatom}->tagline(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
description: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 39 | 9 | ▶ | sub title { shift->{hatom}->title(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
title: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 40 | 5 | ▶ | sub link { shift->{hatom}->link(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
link: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 41 | 1 | ▶ | sub self_link { shift->{hatom}->link(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
self_link: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 42 | 3 | ▶ | sub generator { shift->{hatom}->generator(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
generator: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 43 | 0 | ▶ | sub id { shift->{hatom}->id(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
id: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 44 | 0 | ▶ | sub updated { shift->{hatom}->modified(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
updated: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 45 | 6 | ▶ | sub modified { shift->{hatom}->modified(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
modified: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 46 | 3 | ▶ | sub copyright { | ||||||||||||||||||||||||||||||
|
Subroutine
copyright: called CC=4 SCAR=14.1
Pod
documented
| |||||||||||||||||||||||||||||||||
| 47 | 3 | my $feed = shift; | |||||||||||||||||||||||||||||||
| 48 | 3 | ▶ | if (@_ && defined $_[0]) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
@_ and defined $_[0]
MC/DC50%1/2
@_ and defined $_[0]
@_
defined $_[0]
Truth table66%2/3
A and B
A= @_B= defined $_[0]
| |||||||||||||||||||||||||||||||||
| 49 | 1 | $feed->{hatom}->copyright({ text => $_[0] }); | |||||||||||||||||||||||||||||||
| 50 | } else { | ||||||||||||||||||||||||||||||||
| 51 | 2 | ▶ | $feed->{hatom}->copyright ? $feed->{hatom}->copyright->{text} : undef; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 52 | } | ||||||||||||||||||||||||||||||||
| 53 | } | ||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||
| 55 | 0 | ▶ | sub lat { shift->_do_geo('longitude', @_) } | ||||||||||||||||||||||||||||||
|
Subroutine
lat: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 56 | 0 | ▶ | sub long { shift->_do_geo('longitude', @_) } | ||||||||||||||||||||||||||||||
|
Subroutine
long: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||||||
| 58 | 0 | ▶ | sub _do_geo { | ||||||||||||||||||||||||||||||
|
Subroutine
_do_geo: not called CC=5 SCAR=34.0
| |||||||||||||||||||||||||||||||||
| 59 | 0 | my $thing = shift; | |||||||||||||||||||||||||||||||
| 60 | 0 | my $what = shift; | |||||||||||||||||||||||||||||||
| 61 | 0 | my $geo = $thing->geo; | |||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||
| 63 | 0 | ▶ | if (@_ && defined $_[0]) { | ||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition0%0/3
@_ and defined $_[0]
MC/DC0%0/2
@_ and defined $_[0]
@_
defined $_[0]
Truth table0%0/3
A and B
A= @_B= defined $_[0]
| |||||||||||||||||||||||||||||||||
| 64 | 0 | ▶ | $geo = Data::Microformat::geo->new unless defined $geo; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 65 | 0 | $geo->$what($_[0]); | |||||||||||||||||||||||||||||||
| 66 | 0 | $thing->geo($geo); | |||||||||||||||||||||||||||||||
| 67 | } elsif (defined $geo) { | ||||||||||||||||||||||||||||||||
| 68 | 0 | return $geo->$what; | |||||||||||||||||||||||||||||||
| 69 | } else { | ||||||||||||||||||||||||||||||||
| 70 | 0 | return undef; | |||||||||||||||||||||||||||||||
| 71 | } | ||||||||||||||||||||||||||||||||
| 72 | } | ||||||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||||||
| 74 | 0 | ▶ | sub category { shift->{hatom}->categories(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
category: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||||||
| 76 | 5 | ▶ | sub language { shift->{hatom}->language(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
language: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||
| 78 | # TODO | ||||||||||||||||||||||||||||||||
| 79 | # add_link | ||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||
| 81 | 5 | ▶ | sub author { | ||||||||||||||||||||||||||||||
|
Subroutine
author: called CC=4 SCAR=14.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 82 | 5 | my $feed = shift; | |||||||||||||||||||||||||||||||
| 83 | 5 | ▶ | if (@_ && defined $_[0]) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
@_ and defined $_[0]
MC/DC50%1/2
@_ and defined $_[0]
@_
defined $_[0]
Truth table66%2/3
A and B
A= @_B= defined $_[0]
| |||||||||||||||||||||||||||||||||
| 84 | 1 | my $person = Data::Microformat::hCard->new; | |||||||||||||||||||||||||||||||
| 85 | 1 | $person->fn($_[0]); | |||||||||||||||||||||||||||||||
| 86 | 1 | $feed->{hatom}->author($person); | |||||||||||||||||||||||||||||||
| 87 | } else { | ||||||||||||||||||||||||||||||||
| 88 | 4 | ▶ | $feed->{hatom}->author ? $feed->{hatom}->author->fn : undef; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 89 | } | ||||||||||||||||||||||||||||||||
| 90 | } | ||||||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||||||
| 92 | 6 | ▶ | sub entries { | ||||||||||||||||||||||||||||||
|
Subroutine
entries: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 93 | 6 | my @entries; | |||||||||||||||||||||||||||||||
| 94 | 6 | for my $entry ($_[0]->{hatom}->entries) { | |||||||||||||||||||||||||||||||
| 95 | 9 | push @entries, XML::Feed::Entry::Format::hAtom->wrap($entry); | |||||||||||||||||||||||||||||||
| 96 | } | ||||||||||||||||||||||||||||||||
| 97 | 6 | @entries; | |||||||||||||||||||||||||||||||
| 98 | } | ||||||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||||||
| 100 | 3 | ▶ | sub add_entry { | ||||||||||||||||||||||||||||||
|
Subroutine
add_entry: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 101 | 3 | my $feed = shift; | |||||||||||||||||||||||||||||||
| 102 | 3 | ▶ | my $entry = shift || return; | ||||||||||||||||||||||||||||||
|
Condition50%1/2
shift() || (return)
MC/DC0%0/1
shift() || (return)
shift()
Truth table50%1/2
A
A= shift()
| |||||||||||||||||||||||||||||||||
| 103 | 3 | $entry = $feed->_convert_entry($entry); | |||||||||||||||||||||||||||||||
| 104 | 3 | $feed->{hatom}->entries($entry->{entry}); | |||||||||||||||||||||||||||||||
| 105 | } | ||||||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||||||
| 107 | 3 | ▶ | sub as_xml { shift->{hatom}->to_html } | ||||||||||||||||||||||||||||||
|
Subroutine
as_xml: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 108 | |||||||||||||||||||||||||||||||||
| 109 | package XML::Feed::Entry::Format::hAtom; | ||||||||||||||||||||||||||||||||
| 110 | 6 | ▶ | use strict; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||||||
| 112 | 6 | ▶ | use base qw( XML::Feed::Entry ); | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 113 | 6 | ▶ | use XML::Feed::Content; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 114 | 6 | ▶ | use Data::Microformat::hFeed::hEntry; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 115 | 6 | ▶ | use Data::Microformat::geo; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 116 | 6 | ▶ | use HTML::Entities; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 117 | |||||||||||||||||||||||||||||||||
| 118 | 3 | ▶ | sub init_empty { | ||||||||||||||||||||||||||||||
|
Subroutine
init_empty: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 119 | 3 | my $entry = shift; | |||||||||||||||||||||||||||||||
| 120 | 3 | $entry->{entry} = Data::Microformat::hFeed::hEntry->new; | |||||||||||||||||||||||||||||||
| 121 | 3 | $entry; | |||||||||||||||||||||||||||||||
| 122 | } | ||||||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||||||
| 124 | 10 | ▶ | sub title { shift->{entry}->title(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
title: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 125 | 0 | ▶ | sub source { shift->{entry}->source(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
source: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||
| 126 | 0 | ▶ | sub updated { shift->{entry}->updated(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
updated: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||
| 127 | 0 | ▶ | sub base { shift->{entry}->base(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
base: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||
| 128 | 7 | ▶ | sub link { shift->{entry}->link(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
link: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 129 | 7 | ▶ | sub id { shift->{entry}->id(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
id: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 130 | 8 | ▶ | sub issued { shift->{entry}->issued(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
issued: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 131 | 6 | ▶ | sub modified { shift->{entry}->modified(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
modified: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||||||
| 133 | 3 | ▶ | sub lat { shift->_do_geo('longitude', @_) } | ||||||||||||||||||||||||||||||
|
Subroutine
lat: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 134 | 3 | ▶ | sub long { shift->_do_geo('longitude', @_) } | ||||||||||||||||||||||||||||||
|
Subroutine
long: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||
| 136 | 6 | ▶ | sub _do_geo { | ||||||||||||||||||||||||||||||
|
Subroutine
_do_geo: called CC=5 SCAR=22.3
| |||||||||||||||||||||||||||||||||
| 137 | 6 | my $thing = shift; | |||||||||||||||||||||||||||||||
| 138 | 6 | my $what = shift; | |||||||||||||||||||||||||||||||
| 139 | 6 | my $geo = $thing->{entry}->geo; | |||||||||||||||||||||||||||||||
| 140 | |||||||||||||||||||||||||||||||||
| 141 | 6 | ▶ | if (@_ && defined $_[0]) { | ||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition33%1/3
@_ and defined $_[0]
MC/DC0%0/2
@_ and defined $_[0]
@_
defined $_[0]
Truth table33%1/3
A and B
A= @_B= defined $_[0]
| |||||||||||||||||||||||||||||||||
| 142 | 0 | ▶ | $geo = Data::Microformat::geo->new unless defined $geo; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 143 | 0 | $geo->$what($_[0]); | |||||||||||||||||||||||||||||||
| 144 | 0 | $thing->geo($geo); | |||||||||||||||||||||||||||||||
| 145 | } elsif (defined $geo) { | ||||||||||||||||||||||||||||||||
| 146 | 0 | return $geo->$what; | |||||||||||||||||||||||||||||||
| 147 | } else { | ||||||||||||||||||||||||||||||||
| 148 | 6 | return undef; | |||||||||||||||||||||||||||||||
| 149 | } | ||||||||||||||||||||||||||||||||
| 150 | } | ||||||||||||||||||||||||||||||||
| 151 | |||||||||||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||||||||
| 153 | 10 | ▶ | sub summary { shift->_do_text('summary', @_) } | ||||||||||||||||||||||||||||||
|
Subroutine
summary: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 154 | 15 | ▶ | sub content { shift->_do_text('content', @_) } | ||||||||||||||||||||||||||||||
|
Subroutine
content: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||||||
| 156 | 25 | ▶ | sub _do_text { | ||||||||||||||||||||||||||||||
|
Subroutine
_do_text: called CC=6 SCAR=17.9
| |||||||||||||||||||||||||||||||||
| 157 | 25 | my $entry = shift; | |||||||||||||||||||||||||||||||
| 158 | 25 | my $field = shift; | |||||||||||||||||||||||||||||||
| 159 | 25 | ▶ | if (@_ && defined $_[0]) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
@_ and defined $_[0]
MC/DC50%1/2
@_ and defined $_[0]
@_
defined $_[0]
Truth table66%2/3
A and B
A= @_B= defined $_[0]
| |||||||||||||||||||||||||||||||||
| 160 | 7 | ▶ | if (ref($_[0]) eq 'XML::Feed::Content') { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 161 | 3 | ▶ | my $content = (defined $_[0]->type && $_[0]->type eq 'text/plain') ? encode_entities($_[0]->body) : $_[0]->body; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $_[0]->type and $_[0]->type eq "text/plain"
MC/DC100%2/2
defined $_[0]->type and $_[0]->type eq "text/plain"
defined $_[0]->type
$_[0]->type eq "text/plain"
Truth table100%3/3
A and B
A= defined $_[0]->typeB= $_[0]->type eq "text/plain"
| |||||||||||||||||||||||||||||||||
| 162 | 3 | $entry->{entry}->$field($content); | |||||||||||||||||||||||||||||||
| 163 | } else { | ||||||||||||||||||||||||||||||||
| 164 | 4 | $entry->{entry}->$field($_[0]); | |||||||||||||||||||||||||||||||
| 165 | } | ||||||||||||||||||||||||||||||||
| 166 | } else { | ||||||||||||||||||||||||||||||||
| 167 | 18 | return XML::Feed::Content->new({ type => 'text/html', body => $entry->{entry}->$field }); | |||||||||||||||||||||||||||||||
| 168 | } | ||||||||||||||||||||||||||||||||
| 169 | } | ||||||||||||||||||||||||||||||||
| 170 | |||||||||||||||||||||||||||||||||
| 171 | 9 | ▶ | sub category { shift->{entry}->tags(@_) } | ||||||||||||||||||||||||||||||
|
Subroutine
category: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 172 | |||||||||||||||||||||||||||||||||
| 173 | 7 | ▶ | sub author { | ||||||||||||||||||||||||||||||
|
Subroutine
author: called CC=4 SCAR=13.9
| |||||||||||||||||||||||||||||||||
| 174 | 7 | my $entry = shift; | |||||||||||||||||||||||||||||||
| 175 | 7 | ▶ | if (@_ && $_[0]) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
@_ and $_[0]
MC/DC50%1/2
@_ and $_[0]
@_
$_[0]
Truth table66%2/3
A and B
A= @_B= $_[0]
| |||||||||||||||||||||||||||||||||
| 176 | 1 | my $person = Data::Microformat::hCard->new; | |||||||||||||||||||||||||||||||
| 177 | 1 | $person->fn($_[0]); | |||||||||||||||||||||||||||||||
| 178 | 1 | $entry->{entry}->author($person); | |||||||||||||||||||||||||||||||
| 179 | } else { | ||||||||||||||||||||||||||||||||
| 180 | 6 | ▶ | $entry->{entry}->author ? $entry->{entry}->author->fn : undef; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 181 | } | ||||||||||||||||||||||||||||||||
| 182 | } | ||||||||||||||||||||||||||||||||
| 183 | |||||||||||||||||||||||||||||||||
| 184 | 0 | ▶ | sub as_xml { shift->{entry}->to_html } | ||||||||||||||||||||||||||||||
|
Subroutine
as_xml: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||
| 185 | |||||||||||||||||||||||||||||||||
| 186 | 6 | 1; | |||||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||||||
| 188 | __END__ | ||||||||||||||||||||||||||||||||