RoPkg::Simba(3pm)
π RoPkg::Simba π
okay bestie, gather round, because this is the main character of the whole Simba situation β it's RoPkg::Simba, the main class of simba, and it's a Perl module (a 3pm one, so you know it's for the devs π«Ά). Version 0.8.4, if you were wondering. Sit down, grab a strawberry π, let's go.
β¨ SYNOPSIS β¨
here's the vibe in code form, copy it exactly, no cap:
!#/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();
(yes, !#/usr/bin/perl is literally what's there, i am not fixing it, i am just the messenger π)
πΈ DESCRIPTION πΈ
This class encapsulates all the necesary code required to run Simba. like, all of it. it's the whole package, the entire vibe, the moment. π
π SUBROUTINES/METHODS π
new()
new() expects a hash ref as a parameter. That hash can contain (for the moment, bestie, it's growing π±) only the cfgFile β aka the configuration file. Every other hash key? Ignored. Not seen. Not perceived. π
SimbaURL
Returns the url with simba website. that's it, that's the method. β¨
VERSION
Returns a string with simba version.
MirrorsNo($fields)
returns the number of the mirrors from the database. The mirrors can be filtered using the $fields parameter (as documented in SQL::Abstract - where).
Mirrors($fields)
returns a array of RoPkg::Simba::Mirror initialized objects. The mirrors can be filtered using the $fields parameter (as documented in SQL::Abstract - where).
CommandsNo($fields)
returns the number of commands from the database. The commands can be filtered using the $fields parameter (as documented in SQL::Abstract - where).
Commands
returns a array of RoPkg::Simba::Command initialized objects. The commands can be filtered using the $fields parameter (as documented in SQL::Abstract - where).
ExcludeNo
returns the number of excludes from the database. The excludes can be filtered using the $fields parameter (as documented in SQL::Abstract - where).
Excludes
returns a array of RoPkg::Simba::Excludes initialized objects. The excludes can be filtered using the $fields parameter (as documented in SQL::Abstract - where).
LoadMirror($fields)
load a mirror (and the related objects: command and exclude list) from the database and return a list of 3 objects:
- the mirror object (
RoPkg::Simba::Mirror) - the command object (
RoPkg::Simba::Command) - the excludes object (
RoPkg::Simba::Excludes)
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 it checks if the command file name really exists. π
Run($fields)
The most used method by simba β the it-girl of this module, honestly. π 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).
RunCallbacks($cbName, @mirrors)
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.
π SEE ALSO π
RoPkg::Simba::Mirror RoPkg::Simba::Command RoPkg::Simba::Exclude RoPkg::Simba::Mirrors RoPkg::Simba::Commands RoPkg::Simba::Excludes
go read the whole friend group, they're all icons π«Ά
π PERL CRITIC π
This module is perl critic level 2 compliant (with one exception). one little exception, a tiny little secret, we don't talk about it π€«
π§ DIAGNOSTICS π§
This module has his own tests in the t directory. To run the tests, unpack the source and use make test command.
π CONFIGURATION AND ENVIRONMENT π
This class use a configuration file. No environment variables are used β none, zero, not a single one. The configuration file format and the complete list of options (with detailed explanations) can be found on the community website: http://simba.packages.ro
DEPENDENCIES
okay so this section is literally just a heading with nothing under it in the original. that's the whole vibe. the deps info lives in INCOMPATIBILITIES, keep scrolling bestie π
π¦ INCOMPATIBILITIES π¦
Please check the Makefile.PL for a detalied list of dependencies and their versions.
π BUGS AND LIMITATIONS π
No bugs known. For now, Simba can work only with rsync. (just rsync, that's the whole roster, that's the limit π
)
π AUTHOR π
Subredu Manuel <diablo@iasi.roedu.net>
π LICENSE AND COPYRIGHT π
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.
and that's the whole page, bestie!! this little doc came to you from perl v5.28.1, dated 2018-12-09, and it's the RoPkg::Simba(3pm) manpage. slay, read it, love it, make test it. periodt. πβ¨π
π¦ where this page comes from
- ubuntu jammy: simba 0.8.4-6
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms