blib/lib/WWW/Blog/Metadata/Yadis.pm

filter: Statementstmt 77.7% 7 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 83.3% 10 / 12 CC 1 SCAR 0.9
CC
1
Cov
78%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
↑ Summary
1 package WWW::Blog::Metadata::Yadis;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
5 $VERSION = '0.03';
6  
7 0 ▶use WWW::Blog::Metadata;
Subroutine BEGIN: called CC=1 SCAR=2.6
8  
9 WWW::Blog::Metadata->mk_accessors(qw( xrds_location ));
10  
11 sub on_got_tag {
12 my $class = shift;
13 my($meta, $tag, $attr, $base_uri) = @_;
14 if ($tag eq 'meta' && $attr->{'http-equiv'}) {
15 my %head = map { $_ => 1 } split /\s+/, lc $attr->{'http-equiv'};
16 for my $srv (qw( yadis xrds )) {
17 if ($head{"x-${srv}-location"}) {
18 $meta->xrds_location($attr->{content}) unless ($meta->xrds_location);
19 }
20 }
21 }
22 }
23  
24 sub on_got_tag_order { 99 }
25  
26 1;
27 __END__
↑ Summary