This file is indexed.

/usr/share/perl5/Geo/GoogleEarth/Pluggable/Folder.pm is in libgeo-googleearth-pluggable-perl 0.15-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
package Geo::GoogleEarth::Pluggable::Folder;
use base qw{Geo::GoogleEarth::Pluggable::Base}; 
use XML::LibXML::LazyBuilder qw{E};
use Scalar::Util qw{blessed};
use warnings;
use strict;

use Module::Pluggable search_path => "Geo::GoogleEarth::Pluggable::Plugin";
use base qw{Method::Autoload};

use Geo::GoogleEarth::Pluggable::NetworkLink;
use Geo::GoogleEarth::Pluggable::LookAt;

our $VERSION ='0.14';

=head1 NAME

Geo::GoogleEarth::Pluggable::Folder - Geo::GoogleEarth::Pluggable::Folder object

=head1 SYNOPSIS

  use Geo::GoogleEarth::Pluggable;
  my $document=Geo::GoogleEarth::Pluggable->new;
  my $folder=$document->Folder(name=>"My Folder");

=head1 DESCRIPTION

Geo::GoogleEarth::Pluggable::Folder is a L<Geo::GoogleEarth::Pluggable::Base> with a few other methods.

=head1 USAGE

  my $folder=$document->Folder();  #add folder to $document
  my $subfolder=$folder->Folder(); #add folder to $folder

=head1 METHODS

=cut

=head2 initialize

We overide the default "initialize" method in order to append the "plugins" method from L<Module::Pluggable> on to the packages list of the L<Method::Autoload> package.

The "packages" property is what is needed by L<Method::Autoload> package.  The "plugins" method is what is provided by L<Module::Pluggable>.  So, the Folder package now has available to it every method in the "Plugins" folder at runtime.

=cut

sub initialize {
  my $self = shift();
  %$self=@_;
  $self->pushPackages($self->plugins); 
}

=head2 Folder

Constructs a new Folder object and appends it to the parent folder object.  Returns the object reference if you need to make any setting changes after construction.

  my $folder=$folder->Folder(name=>"My Folder");
  $folder->Folder(name=>"My Folder");

=cut

sub Folder {
  my $self=shift;
  my $obj=Geo::GoogleEarth::Pluggable::Folder->new(document=>$self->document, @_);
  $self->data($obj);
  return $obj;
}

=head2 NetworkLink

Constructs a new NetworkLink object and appends it to the parent folder object.  Returns the object reference if you need to make any setting changes after construction.

  $folder->NetworkLink(name=>"My NetworkLink", url=>"./anotherdoc.kml");

=cut

sub NetworkLink {
  my $self=shift();
  my $obj=Geo::GoogleEarth::Pluggable::NetworkLink->new(document=>$self->document, @_);
  $self->data($obj);
  return $obj;
}

=head2 LookAt

Constructs a new LookAt object and returns the object reference to assign to other object "lookat" properties.

  $document->LookAt(
                    latitude  => $lat,    #decimal degrees
                    longitude => $lon,    #decimal degrees
                    range     => $range,  #meters
                    tilt      => $tilt,   #decimal degrees from veritical
                    heading   => $header, #decimal degrees from North
                   );

=cut

sub LookAt {
  my $self=shift();
  my $obj=Geo::GoogleEarth::Pluggable::LookAt->new(document=>$self->document, @_);
  $self->data($obj);
  return $obj;
}

=head2 type

Returns the object type.

  my $type=$folder->type;

=cut

sub type {"Folder"};

=head2 node

=cut

sub node {
  my $self=shift;
  my @data=();
  push @data, E(name=>{}, $self->name) if defined $self->name;
  push @data, E(Snippet=>{maxLines=>scalar(@{$self->Snippet})}, join("\n", @{$self->Snippet}));
  push @data, E(description=>{}, $self->description)
    if defined $self->description;
  push @data, E(open=>{}, $self->open) if defined $self->open;
  my @style=();
  my @stylemap=();
  my @element=();
  foreach my $obj ($self->data) {
    if (blessed($obj) and $obj->can("type") and $obj->type eq "Style") {
      push @style, $obj->node;
    } elsif (blessed($obj) and $obj->can("type") and $obj->type eq "StyleMap") {
      push @stylemap, $obj->node;
    } else {
      push @element, $obj->node;
    }
  }
  return E($self->type=>{}, @data, @style, @stylemap, @element);
}

=head2 data

Pushes arguments onto data array and returns an array or reference that holds folder object content.  This is a list of objects that supports a type and structure method.

  my $data=$folder->data;
  my @data=$folder->data;
  $folder->data($placemark);

=cut

sub data {
  my $self=shift();
  $self->{'data'} = [] unless ref($self->{'data'}) eq "ARRAY";
  my $data=$self->{'data'};
  if (@_) {
    push @$data, @_;
  }
  return wantarray ? @$data : $data;
}

=head2 open

=cut

sub open {shift->{"open"}};

=head1 BUGS

Please log on RT and send to the geo-perl email list.

=head1 LIMITATIONS

Due to limitations in Perl hashes, it is not possible to specify the order of certain elements and attributes in the XML.

=head1 TODO

=head1 SUPPORT

Try geo-perl email list.

=head1 AUTHOR

  Michael R. Davis (mrdvt92)
  CPAN ID: MRDVT

=head1 COPYRIGHT

This program is free software licensed under the...

  The BSD License

The full text of the license can be found in the
LICENSE file included with this module.

=head1 SEE ALSO

L<Geo::GoogleEarth::Pluggable>, L<Module::Pluggable> L<Method::Autoload>, L<XML::LibXML::LazyBuilder>

=cut

1;