RoPkg:...Mirror(3pm)

πŸ“¦ version 0.8.4, in ubuntu jammy

πŸ’– 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:

  • id
  • Name
  • Description
  • HomeSite
  • LocalDir
  • Size
  • SyncMethod
  • CommandID
  • LastErrorCode
  • Active
  • InProgress
  • SyncSource
  • SyncSourceUser
  • SyncSourcePass
  • SyncSourceModule
  • Contact
  • LastUpdated
  • LastUpdateDuration
  • LastUpdateSpeed
  • LastUpdateFilesNo
  • LastUpdateBytes
  • LocalURL
  • StdOut
  • StdErr

πŸ’œ 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::DBObject
  • RoPkg::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::Simba
  • RoPkg::Simba::Mirrors
  • RoPkg::DBObject
  • RoPkg::Object

πŸ’Œ AUTHOR πŸ’Œ

Subredu Manuel <diablo@iasi.roedu.net> β€” thank you for your service, legend 🫑


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 is RoPkg:...Mirror(3pm) while the footer is RoPkg:...Mirror(3pm) again, because symmetry. bye bestie, go load some mirrors πŸͺžβœ¨πŸ’…
πŸ“¦ where this page comes from