DOKK / manpages / debian 11 / simba / RoPkg::Simba.3pm.en
RoPkg::Simba(3pm) User Contributed Perl Documentation RoPkg::Simba(3pm)

RoPkg::Simba - the main class of simba

0.8.4

 !#/usr/bin/perl
 
 use RoPkg::DB;
 use RoPkg::Simba;
 
 sub main {
   my $simba = new RoPkg::Simba(cfgFile => '/etc/simba.cfg');
   $simba->Run({ Name => 'debian'});
 }
 
 main();

This class encapsulates all the necesary code required to run Simba.

new()

new() expects a hash ref as a parameter. The hash can contain (for the moment) only the cfgFile (the configuration file). All other hash keys are ignored.

Returns the url with simba website

VERSION

Returns a string with simba version

returns the number of the mirrors from the database. The mirrors can be filtered using the $fields parameter (as documented in SQL::Abstract - where)

returns a array of RoPkg::Simba::Mirror initialized objects. The mirrors can be filtered using the $fields parameter (as documented in SQL::Abstract - where)

returns the number of commands from the database. The commands can be filtered using the $fields parameter (as documented in SQL::Abstract - where)

returns a array of RoPkg::Simba::Command initialized objects. The commands can be filtered using the $fields parameter (as documented in SQL::Abstract - where)

returns the number of excludes from the database. The excludes can be filtered using the $fields parameter (as documented in SQL::Abstract - where)

returns a array of RoPkg::Simba::Excludes initialized objects. The excludes can be filtered using the $fields parameter (as documented in SQL::Abstract - where)

load a mirror (and the related objects: command and exclude list) from the database and return a list of 3 objects:

Ex:
my ($mirror, $command, $excludes);

 ($mirror, $command, $excludes) = $simba->LoadMirror({ Name => 'debian'});

The mirrors can be filtered using the $fields parameter (as documented in SQL::Abstract - where). This method also checks if all necesary values are defined and well formed; for example checks if the command file name really exists.

The most used method by simba. This method loads the mirror from the database, the command and the exclude list, builds the command line (with respect to username and password if necesary), signals mirror in progress, executes the command, parses the sync raw log and updates the database. Also, the afterSync handler callback is registered to this method. The mirrors can be filtered using the $fields parameter (as documented in SQL::Abstract - where).

call the plugin methods for $cbName callback name.

CheckDB()

Checks if database has at least one mirror and one command defined.

dbh()

returns the database handler used by Simba

dbo()

returns the instance of RoPkg::DB object, used by Simba

dbo_method()

returns the method used by Simba's dbo() object to access the mirrors database.

RoPkg::Simba::Mirror RoPkg::Simba::Command RoPkg::Simba::Exclude RoPkg::Simba::Mirrors RoPkg::Simba::Commands RoPkg::Simba::Excludes

This module is perl critic level 2 compliant (with one exception)

This module has his own tests in the t directory. To run the tests, unpack the source and use 'make test' command.

This class use a configuration file. No environment variables are used. The configuration file format and the complete list of options (with detailed explanations) can be found on the community website: http://simba.packages.ro

Please check the Makefile.PL for a detalied list of dependencies and their versions.

No bugs known. For now, Simba can work only with rsync.

Subredu Manuel <diablo@iasi.roedu.net>

Copyright (C) 2005 Subredu Manuel. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license.

2018-12-09 perl v5.28.1