| 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__ | ||