NAME

MMM::Mirror

DESCRIPTION

An object to retain per mirror information

METHODS

new

Create a MMM::Mirror object from information found in hash passed as arguments.

my $mirror MMM::Mirror->new( url => 'rsync://host/foo/' );

url

Return the url of the mirror

host

Return the hostname of the mirror found in url

level

Return the level of this mirror in mirrors hierarchy

frequency

Period in minutes between sync performed by this mirror

source

Return the mirror source name from which this mirror is part of.

set_source($source)

Set the source name for this mirror.

hostinfo

Return a MMM::Host object proper to the mirror if any

get_geo

Load host geo info if any

random

Return a cached random value assigned to this mirror.

info

Return textual information about this mirror

revision

Return the revision of the entry. The revision is an id to identify if an entry is newer than another for same mirror.

refresh_revision

Reset revision to current timestamp

same_mirror($mirror)

Compare this mirror with another and return 1 if both entries refer to same mirror

sync_mirror($mirror)

Get unknown values from $mirror if defined.

xml_output

Return a xml string describing this mirror.

See also <MMM::MirrorList::xml_output>

AUTHOR

Olivier Thauvin <nanardon@nanardon.zarb.org>

COPYRIGHT AND LICENSE

Copyright (C) 2006 Olivier Thauvin

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.