line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Goo::BackLinkManager; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
############################################################################### |
4
|
|
|
|
|
|
|
# Nigel Hamilton |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# Copyright Nigel Hamilton 2005 |
7
|
|
|
|
|
|
|
# All Rights Reserved |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# Author: Nigel Hamilton |
10
|
|
|
|
|
|
|
# Filename: Goo::BackLinkManager.pm |
11
|
|
|
|
|
|
|
# Description: Traverse the backlinks for a given "Thing" |
12
|
|
|
|
|
|
|
# |
13
|
|
|
|
|
|
|
# Date Change |
14
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------- |
15
|
|
|
|
|
|
|
# 01/07/2005 Auto generated file |
16
|
|
|
|
|
|
|
# 01/07/2005 Need to find backlinks easily! |
17
|
|
|
|
|
|
|
# 24/08/2005 Added method: generateBackLinks |
18
|
|
|
|
|
|
|
# 24/08/2005 Added method: showHeader |
19
|
|
|
|
|
|
|
# 27/08/2005 Added method: getBackLinksTable |
20
|
|
|
|
|
|
|
# 28/08/2005 Added method: run |
21
|
|
|
|
|
|
|
# 28/08/2005 Added method: showProfile |
22
|
|
|
|
|
|
|
# |
23
|
|
|
|
|
|
|
############################################################################### |
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
1
|
|
3325
|
use strict; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
28
|
|
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
1
|
|
4
|
use Goo::Object; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
15
|
|
28
|
1
|
|
|
1
|
|
6
|
use Goo::Loader; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
29
|
1
|
|
|
1
|
|
6
|
use Goo::Profile; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
34
|
|
30
|
1
|
|
|
1
|
|
5
|
use Goo::BackLinkFinder; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
1
|
|
7
|
use base qw(Goo::Object); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
335
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# use Smart::Comments; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
############################################################################### |
38
|
|
|
|
|
|
|
# |
39
|
|
|
|
|
|
|
# run - do the thing |
40
|
|
|
|
|
|
|
# |
41
|
|
|
|
|
|
|
############################################################################### |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub run { |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
0
|
1
|
|
my ($this, $thing) = @_; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
### get the commands for the backlinkviewer |
48
|
0
|
|
|
|
|
|
my $profile = Goo::Profile->new(Goo::Loader::load("blv.goo")); |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
my $filename = $thing->get_filename(); |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
while (1) { |
53
|
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
$profile->clear(); |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# scanning for backlinks |
57
|
0
|
|
|
|
|
|
Goo::Prompter::say("Scanning for back links to $filename ..."); |
58
|
|
|
|
|
|
|
|
59
|
0
|
|
|
|
|
|
my @things = Goo::BackLinkFinder::get_back_links($filename); |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
$profile->clear(); |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
$profile->show_header("Back Links Viewer", $filename, $thing->get_location()); |
64
|
|
|
|
|
|
|
|
65
|
0
|
0
|
|
|
|
|
if (@things) { |
66
|
0
|
|
|
|
|
|
$profile->add_options_table("Back Links to $filename", 4, |
67
|
|
|
|
|
|
|
"Goo::ThingProfileOption", @things); |
68
|
|
|
|
|
|
|
} else { |
69
|
0
|
|
|
|
|
|
$profile->show_message("Nothing links back to " . $thing->get_filename()); |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
$profile->display(); |
73
|
0
|
|
|
|
|
|
$profile->get_command(); |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
1; |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
__END__ |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 NAME |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Goo::BackLinkManager - Display the backlinks for a given "Thing" |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 SYNOPSIS |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
use Goo::BackLinkManager; |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 DESCRIPTION |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
A generic action handler for showing Back [L]inks. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Uses the BackLinkFinder to extracts the backlinks for a given "Thing" |
98
|
|
|
|
|
|
|
then displays a profile of the results. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 METHODS |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=over |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item run |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Call the BackLinkFinder and display the results. |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=back |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 AUTHOR |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Nigel Hamilton <nigel@trexy.com> |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 SEE ALSO |
115
|
|
|
|
|
|
|
|