line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XML::RSS::Headline::Fark; |
2
|
1
|
|
|
1
|
|
5103
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
33
|
|
4
|
1
|
|
|
1
|
|
5
|
use base qw(XML::RSS::Headline); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
674
|
|
5
|
1
|
|
|
1
|
|
7
|
use URI::Escape qw(uri_unescape); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
280
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = 2.32; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub item { |
10
|
0
|
|
|
0
|
1
|
|
my ( $self, $item ) = @_; |
11
|
0
|
|
|
|
|
|
$self->SUPER::item($item); # set url and description |
12
|
|
|
|
|
|
|
|
13
|
0
|
|
|
|
|
|
my $headline = $self->headline; |
14
|
0
|
|
|
|
|
|
$headline =~ s/\[.+?\]\s+//; |
15
|
0
|
|
|
|
|
|
$self->headline($headline); |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
my $domain = qr{ http [:] [/] [/] go [.] fark [.] com }x; |
18
|
0
|
|
|
|
|
|
my $uri = qr{ [/] cgi [/] fark [/] go [.] pl }x; |
19
|
0
|
|
|
|
|
|
my $args = qr{ [?] IDLink [=] \d+ [&] location [=] }x; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
my $url = $self->url; |
22
|
0
|
|
|
|
|
|
$url =~ s/$domain$uri$args//; |
23
|
0
|
|
|
|
|
|
$self->url( uri_unescape($url) ); |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
return; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |