RoPkg:...Mirror(3pm)
π RoPkg:...Mirror(3pm) π
okay bestie, this is a page from the User Contributed Perl Documentation, and it's all about RoPkg::Simba::Mirror β yes the module is literally named RoPkg::Simba::Mirror even though the page title is out here being all mysterious with RoPkg:...Mirror(3pm). iykyk. let's get into it π¦
β¨ NAME β¨
RoPkg::Simba::Mirror β a mirror class π
πΈ VERSION πΈ
0.1.3 β that's the vibe, that's the era, periodt.
π DESCRIPTION π
so like, RoPkg::Simba::Mirror is a class that holds every single piece of info a mirror has. and not just holds it β she's also the one who can add, delete, and update a mirror to and from the database. multitasking queen π.
also important lore: Simba is derivated from RoPkg::DBObject. so all that database energy runs in the family fr fr.
π SYNOPSIS π
here's how you actually use her, no cap:
!#/usr/bin/perl
use RoPkg::DB;
use RoPkg::Simba::Mirror;
sub main {
my $dbp = new RoPkg::DB();
$dbp->Add('dbi:mysql:database=mysql;host=localhost',
'root',
'',
'local');
my $m = new RoPkg::Simba::Mirror(dbo => $dbp, dbo_method => 'db_local');
$m->Name('debian');
$m->Load();
}
main();
(and yes, that shebang really is !#/usr/bin/perl in the original, we do not edit the queen's handwriting π)
π§ SUBROUTINES/METHODS π§
heads up bestie: every single one of these methods raises an OutsideClass exception when called outside a class instance. and on top of that, each method might raise other exceptions too. so like, check each method's own section below to find out what drama it can throw at you. π
π«Ά new()
the class constructor, the moment of creation, main character energy. at this moment in time, she just calls RoPkg::DBObject->new(). please go read the RoPkg::DBObject manual page for more info about the new() parameters, bestie, it's all over there. π
π«Ά table()
returns the name of the mirrors database table. that's it. that's the method. iconic behavior. β¨
π«Ά Add()
adds the mirror to the database. this one is a wrapper for RoPkg::DBObject::SQL_Insert. on success, 0 is returned π. on error, a DBI exception is raised π.
π«Ά Delete()
deletes the current mirror from the database. before you call this, you should set the id of the mirror. if you don't set the id, a Param::Missing exception is raised π¨. on database operation success, 0 is returned. on database error, a DBI exception is raised.
π«Ά Update()
updates the current mirror object with the database. before calling, you should set the id of the mirror. if you don't set the id, Param::Missing gets raised π¨. on database operation success, 0 is returned. on database error, a DBI exception is raised.
π«Ά Load()
loads the mirror information from the database, straight into the current object. before calling this you should have set either id or Name. if neither id nor Name is set, then Param::Missing is raised π¨. on database operation success, 0 is returned. on database error, a DBI exception is raised.
π«Ά GetMethods()
returns an array with the current object's method names. in scalar context, she returns the number of methods instead. slay π₯.
the following methods are get/set methods for all the fields of a mirror, and we are listing every single one because nobody gets left out in this group chat:
idNameDescriptionHomeSiteLocalDirSizeSyncMethodCommandIDLastErrorCodeActiveInProgressSyncSourceSyncSourceUserSyncSourcePassSyncSourceModuleContactLastUpdatedLastUpdateDurationLastUpdateSpeedLastUpdateFilesNoLastUpdateBytesLocalURLStdOutStdErr
π DIAGNOSTICS π
unpack the source, and use the make test command. that's the whole diagnostic ritual, go off. π§ͺ
π CONFIGURATION AND ENVIRONMENT π
this module does not use any configuration files or environment variables. low maintenance, high value, we love a self-sufficient queen. π
π DEPENDENCIES π
RoPkg::DBObjectRoPkg::Exceptions
she doesn't roll alone, she rolls with her friends π«Ά
π INCOMPATIBILITIES π
none known to the author. clean record, no beef. β¨
π BUGS AND LIMITATIONS π
none known to the author. flawless as far as anyone knows π.
π PERL CRITIC π
this module is perl critic level 2 compliant β with 1 exception. so close to perfect, but honestly? relatable. π
π SEE ALSO π
go read these too, bestie, they're all in the same friend group:
RoPkg::SimbaRoPkg::Simba::MirrorsRoPkg::DBObjectRoPkg::Object
π AUTHOR π
Subredu Manuel <diablo@iasi.roedu.net> β thank you for your service, legend π«‘
π 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. read it, bestie, know your rights π
ok that's the whole page!! and before you go β this was served up by perl v5.28.1, dated 2018-12-09, and the page header isRoPkg:...Mirror(3pm)while the footer isRoPkg:...Mirror(3pm)again, because symmetry. bye bestie, go load some mirrors πͺβ¨π
π¦ 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