line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#$Id: UseFeedBurner.pm,v 1.1 2005/11/14 03:39:09 naoya Exp $ |
2
|
|
|
|
|
|
|
package Acme::Web20::Validator::Rule::UseFeedBurner; |
3
|
2
|
|
|
2
|
|
1025
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
71
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
57
|
|
5
|
2
|
|
|
2
|
|
10
|
use base qw (Acme::Web20::Validator::Rule); |
|
2
|
|
|
|
|
49
|
|
|
2
|
|
|
|
|
186
|
|
6
|
2
|
|
|
2
|
|
11
|
use Feed::Find; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
333
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
__PACKAGE__->name('Burning the feed by FeedBurner?'); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub validate { |
11
|
1
|
|
|
1
|
0
|
3
|
my ($self, $res) = @_; |
12
|
1
|
|
|
|
|
6
|
my $html = $res->content; |
13
|
1
|
50
|
|
|
|
27
|
my @feeds = Feed::Find->find_in_html(\$html, $res->base) or return; |
14
|
0
|
|
|
|
|
|
for (@feeds) { |
15
|
0
|
0
|
|
|
|
|
$self->is_ok(1) if m!^http://feeds\.feedburner\.com/!; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
1; |