/usr/lib/perl5/ALTree/SiteCollection.pm is in altree 1.3.1-1.
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 | package ALTree::SiteCollection;
################################################################
################################################################
####################### SiteCollection ########################
################################################################
################################################################
use base 'ALTree::Base';
sub InitSiteCollection {
my $self=shift;
$self->_init("sites" => {});
}
sub AddSite {
my $self=shift;
my $site=shift;
my $site_nb;
$site_nb=$site->GetSiteNb();
$self->{"sites"}->{$site_nb}=$site;
}
sub GetSite {
my $self=shift;
my $site_nb=shift;
#my $site=$self->{"sites"}->{$site_nb};
#if (not defined($site)) {
#die "The site number $site_nb does not exist";
#}
return $self->{"sites"}->{$site_nb};
}
sub HasSiteIndex {
my $self=shift;
my $site_nb=shift;
return exists($self->{"sites"}->{$site_nb});
}
sub GetSitesList {
my $self=shift;
return values(%{$self->{"sites"}});
}
1;
|