Branch Coverage

blib/lib/XML/NewsML_G2/Writer/News_Item.pm
Criterion Covered Total %
branch 64 86 74.4


line true false branch
21 9 48 unless $self->news_item->copyright_holder
31 48 0 if $self->news_item->copyright_holder->uri
33 48 0 if (my $qcode = $self->news_item->copyright_holder->qcode)
41 48 0 if $notice
44 47 1 if $self->news_item->usage_terms
71 53 11 if $self->news_item->has_desks
91 0 64 if @{$self->news_item->storytypes;}
108 0 138 if (&looks_like_number($a) and &looks_like_number($b)) { }
122 53 7 if $self->news_item->has_locations
128 53 106 $l->direct ? :
136 159 0 if defined $l->relevance
139 53 106 if ($l->iso_code)
144 106 53 if ($l->parent)
149 12 94 if $hierarchy
159 56 4 if $self->news_item->has_organisations
177 53 7 if $self->news_item->has_topics
198 53 7 if $self->news_item->has_products
208 53 0 if ($product->isbn) { }
0 0 elsif ($product->ean) { }
226 1 63 if $self->news_item->has_event_references
250 5 59 if $self->news_item->has_concepts
262 12 38 unless $self->scheme_manager->crel
286 56 4 if $self->news_item->has_organisations
298 56 0 if ($org->has_websites)
317 106 53 unless defined $location->longitude and defined $location->latitude
347 47 47 if $_ eq uc $self->news_item->provider->qcode
376 64 0 if ($self->news_item->content_created)
383 53 11 if ($self->news_item->content_modified and $self->news_item->content_created != $self->news_item->content_modified)
398 0 64 if (my $electiondistrict = $self->news_item->electiondistrict)
407 0 0 if (my $electionprovince = $electiondistrict->province)
420 59 5 if ($self->news_item->message_id)
428 0 64 if ($self->news_item->byline)
434 0 64 if ($self->news_item->dateline)
458 53 7 if ($self->news_item->slugline)
462 53 0 if ($self->news_item->slugline_sep)
476 53 7 if ($self->news_item->subtitle)
485 53 7 if ($self->news_item->credit)
497 14 46 if ($self->news_item->caption)
506 0 60 if ($self->news_item->summary)
552 53 7 if $self->news_item->subtitle
560 16 44 $self->news_item->paragraphs ? :
574 0 0 if ($_->isa('XML::NewsML_G2::Inline_CData')) { }
580 0 0 if $_->mimetype