line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
=head1 NAME |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
WWW::Link::Reporter::URI - Report link URIs only |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 SYNOPSIS |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use WWW::Link; |
8
|
|
|
|
|
|
|
use WWW::Link::Reporter::URI; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
$link=new WWW::Link; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
#over time do things to the link ...... |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
$reporter = new WWW::Link::Reporter::URI |
15
|
|
|
|
|
|
|
$reporter->examine($link) |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 DESCRIPTION |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
This is a very simple class derived from WWW::Link::Reporter which |
20
|
|
|
|
|
|
|
simply prints the URIs of each link reported. By chosing the correct |
21
|
|
|
|
|
|
|
reports this is then good for generating output for use in scripts |
22
|
|
|
|
|
|
|
etc. |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=cut |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
package WWW::Link::Reporter::URI; |
27
|
|
|
|
|
|
|
$REVISION=q$Revision: 1.1 $ ; $VERSION = sprintf ( "%d.%02d", $REVISION =~ /(\d+).(\d+)/ ); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
@ISA = qw(WWW::Link::Reporter); |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
1
|
|
623
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
34
|
|
32
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
32
|
|
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
1
|
|
4
|
use WWW::Link::Reporter; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
66
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
BEGIN { |
37
|
1
|
|
|
1
|
|
2
|
foreach my $rep ( qw( broken okay damaged not_checked disallowed |
38
|
|
|
|
|
|
|
unsupported redirections suggestions page_list ) ) { |
39
|
9
|
|
|
|
|
11
|
do { |
40
|
9
|
|
|
0
|
1
|
676
|
eval <
|
|
0
|
|
|
0
|
1
|
|
|
|
0
|
|
|
0
|
1
|
|
|
|
0
|
|
|
0
|
1
|
|
|
|
0
|
|
|
0
|
1
|
|
|
|
0
|
|
|
0
|
0
|
|
|
|
0
|
|
|
0
|
0
|
|
|
|
0
|
|
|
0
|
0
|
|
|
|
0
|
|
|
0
|
1
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub $rep { |
42
|
|
|
|
|
|
|
my \$self=shift; |
43
|
|
|
|
|
|
|
my \$link=shift; |
44
|
|
|
|
|
|
|
my \$url=\$link->url(); |
45
|
|
|
|
|
|
|
print "\$url\n"; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
EOF |
48
|
|
|
|
|
|
|
}; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub not_found { |
53
|
0
|
|
|
0
|
1
|
|
my $self=shift; |
54
|
0
|
|
|
|
|
|
my $url=shift; |
55
|
0
|
|
|
|
|
|
print STDERR "Link $url is not in the database.\n"; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub unknown { |
59
|
0
|
|
|
0
|
1
|
|
my $self=shift; |
60
|
0
|
|
|
|
|
|
my $link=shift; |
61
|
0
|
|
|
|
|
|
my $url=$link->url(); |
62
|
0
|
|
|
|
|
|
print STDERR "Link $url has unknown status (error?).\n"; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|