File Coverage

blib/lib/WWW/Blog/Metadata/Yadis.pm
Criterion Covered Total %
statement 7 9 77.7
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 10 12 83.3


line stmt bran cond sub pod time code
1             package WWW::Blog::Metadata::Yadis;
2              
3 1     1   26903 use strict;
  1         4  
  1         39  
4 1     1   6 use vars qw($VERSION);
  1         2  
  1         64  
5             $VERSION = '0.03';
6              
7 1     1   517 use WWW::Blog::Metadata;
  0            
  0            
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__