line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geo::GoogleEarth::Pluggable::NetworkLink; |
2
|
7
|
|
|
7
|
|
50
|
use base qw{Geo::GoogleEarth::Pluggable::Base}; |
|
7
|
|
|
|
|
17
|
|
|
7
|
|
|
|
|
763
|
|
3
|
7
|
|
|
7
|
|
47
|
use XML::LibXML::LazyBuilder qw{E}; |
|
7
|
|
|
|
|
16
|
|
|
7
|
|
|
|
|
371
|
|
4
|
7
|
|
|
7
|
|
40
|
use warnings; |
|
7
|
|
|
|
|
32
|
|
|
7
|
|
|
|
|
189
|
|
5
|
7
|
|
|
7
|
|
37
|
use strict; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
2216
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION='0.17'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Geo::GoogleEarth::Pluggable::NetworkLink - Geo::GoogleEarth::Pluggable::NetworkLink |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use Geo::GoogleEarth::Pluggable; |
16
|
|
|
|
|
|
|
my $document=Geo::GoogleEarth::Pluggable->new; |
17
|
|
|
|
|
|
|
$document->NetworkLink(url=>"./anotherdocument.cgi"); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 DESCRIPTION |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Geo::GoogleEarth::Pluggable::NetworkLink is a L with a few other methods. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 USAGE |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my $networklink=$document->NetworkLink(name=>"My NetworkLink", |
26
|
|
|
|
|
|
|
url=>"./anotherdocument.cgi"); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 type |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Returns the object type. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
my $type=$networklink->type; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
0
|
1
|
|
sub type {"NetworkLink"}; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head2 node |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub node { |
43
|
0
|
|
|
0
|
1
|
|
my $self=shift; |
44
|
0
|
|
|
|
|
|
my @element=(E(Snippet=>{maxLines=>scalar(@{$self->Snippet})}, join("\n", @{$self->Snippet}))); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
my @link=(); |
46
|
0
|
|
|
|
|
|
my %link=map {$_=>1} qw{href refreshMode refreshInterval viewRefreshMode viewRefreshTime viewBoundScale viewFormat httpQuery}; |
|
0
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
foreach my $key (keys %$self) { |
48
|
0
|
0
|
|
|
|
|
next if $key eq "Snippet"; |
49
|
0
|
0
|
|
|
|
|
if ($key eq "url") { |
|
|
0
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
push @link, E(href=>{}, $self->url); |
51
|
|
|
|
|
|
|
} elsif(exists $link{$key}) { #these go in the Link element |
52
|
0
|
0
|
|
|
|
|
push @link, E($key=>{}, $self->{$key}) unless ref($self->{$key}); |
53
|
|
|
|
|
|
|
} else { |
54
|
0
|
0
|
|
|
|
|
push @element, E($key=>{}, $self->{$key}) unless ref($self->{$key}); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
} |
57
|
0
|
0
|
|
|
|
|
push @element, E(Link=>{}, @link) if @link; |
58
|
0
|
|
|
|
|
|
return E(NetworkLink=>{}, @element); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 url |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Sets or returns the Uniform Resource Locator (URL) for the NetworkLink |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
my $url=$networklink->url; |
66
|
|
|
|
|
|
|
$networklink->url("./newdoc.cgi"); |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub url { |
71
|
0
|
|
|
0
|
1
|
|
my $self=shift(); |
72
|
0
|
0
|
|
|
|
|
if (@_) { |
73
|
0
|
|
|
|
|
|
$self->{'url'}=shift(); |
74
|
|
|
|
|
|
|
} |
75
|
0
|
0
|
|
|
|
|
return defined($self->{'url'}) ? $self->{'url'} : 'http://localhost/'; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 BUGS |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Please log on RT and send to the geo-perl email list. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 SUPPORT |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
DavisNetworks.com supports all Perl applications including this package. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 AUTHOR |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Michael R. Davis (mrdvt92) |
89
|
|
|
|
|
|
|
CPAN ID: MRDVT |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 COPYRIGHT |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
This program is free software licensed under the... |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
The BSD License |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
The full text of the license can be found in the LICENSE file included with this module. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 SEE ALSO |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
L creates a GoogleEarth Document. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=cut |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
1; |