| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package HTML::LinkChanger::URLFilter; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Version: $Id: URLFilter.pm 4 2007-10-05 15:51:37Z sergey.chernyshev $ |
|
4
|
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
543
|
use strict; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
71
|
|
|
6
|
2
|
|
|
2
|
|
13
|
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
463
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
require Exporter; |
|
9
|
|
|
|
|
|
|
require AutoLoader; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
@ISA = qw(Exporter AutoLoader); |
|
12
|
|
|
|
|
|
|
# Items to export into callers namespace by default. Note: do not export |
|
13
|
|
|
|
|
|
|
# names by default without a very good reason. Use EXPORT_OK instead. |
|
14
|
|
|
|
|
|
|
# Do not simply export all your public functions/methods/constants. |
|
15
|
|
|
|
|
|
|
@EXPORT = qw( |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
); |
|
18
|
|
|
|
|
|
|
$VERSION = sprintf("2.%d", q$Rev: 4 $ =~ /(\d+)/); |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Preloaded methods go here. |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# Autoload methods go after =cut, and are processed by the autosplit program. |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub new |
|
25
|
|
|
|
|
|
|
{ |
|
26
|
2
|
|
|
2
|
0
|
1119
|
my $class = shift; |
|
27
|
2
|
|
|
|
|
8
|
my $self = bless {}, $class; |
|
28
|
|
|
|
|
|
|
|
|
29
|
2
|
|
|
|
|
14
|
$self; |
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub url_filter |
|
33
|
|
|
|
|
|
|
{ |
|
34
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
35
|
0
|
|
|
|
|
|
my %args = @_; |
|
36
|
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
my $url = $args{url}; # url of the link |
|
38
|
0
|
|
|
|
|
|
my $tag = $args{tag}; # tag containing a link to change |
|
39
|
0
|
|
|
|
|
|
my $attr = $args{attr}; # attribute containing a link to change |
|
40
|
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
die 'You need to implement this method to create a filter'; |
|
42
|
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
return $url; |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
|
47
|
|
|
|
|
|
|
__END__ |