MMM::MirrorList.3pm

Langue: en

Version: 2006-11-09 (mandriva - 01/05/08)

Section: 3 (Bibliothèques de fonctions)

NAME

MMM::MirrorList

SYNOPSIS

     use MMM::MirrorList;
     my $ml = MMM::MirrorList->new();
     $ml->add_mirror({
         url => 'rsync://foo/bar'
         }, 'source');
     print join(' ', $ml->list_sources());
 
 

DESCRIPTION

An object to retain, sort and dump mirrors list.

METHODS


new

Return a new MMM::MirrorList object.

list_sources

Return the source mirror list availlable in this mirrors list.

list_levels

Return the mirrors level availlable in the mirrors list.

mirrors($source)

Return a list of MMM::Mirror object handle by this list. If $source is specified, only mirrors for this source ar returned.

add_mirror($info, $souce)


add_mirror($info, $souce)

Add a new mirror into the this mirror list.

$info can either a MMM::Mirror object or a hash containing mirror information.

$source is the source name.

load_list($xml)

Load mirrors from the xml mirrors list. $xml is either the xml string or the xml file.

xml_output

Return an xml string about mirror in mirrors list.

SEE ALSO

MMM MMM::Mirror

AUTHOR

Olivier Thauvin <nanardon@nanardon.zarb.org> 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.