RoPkg:...Mirrors(3pm)
π RoPkg:...Mirrors β the manual page, but make it make sense π
okay bestie, sit down, grab a boba, because we're reading the RoPkg:...Mirrors(3pm) page together and honestly? it's cute, it's short, it slays. this is a User Contributed Perl Documentation situation, so you know it's giving community-coded excellence. π«Ά
β¨ NAME β¨
RoPkg::Simba::Mirrors β that's the whole name, no notes, it ate. π
πΈ VERSION πΈ
0.2.2 β yeah, that's the version, and yeah, we're obsessed with it. π
π¦ DESCRIPTION π¦
so basically, RoPkg::Simba::Mirrors is a class, right? and its whole job β its entire main character purpose β is to count the mirrors and get the mirrors from the database. that's it. that's the vibe. count 'em, fetch 'em. iconic behaviour, honestly. β¨
π₯ SYNOPSIS π₯
here's how you actually use it, copy-paste energy, no cap:
!#/usr/bin/perl
use RoPkg::DB;
use RoPkg::Simba::Mirrors;
sub main {
my $dbp = new RoPkg::DB();
$dbp->Add('dbi:mysql:database=mysql;host=localhost',
'root',
'',
'local');
my $m = new RoPkg::Simba::Mirrors(dbo => $dbp, dbo_method => 'db_local');
print $m->Count,' mirrors found in database',$/;
}
main();
like, you spin up a RoPkg::DB, you Add your DSN and creds, you build a RoPkg::Simba::Mirrors with dbo and dbo_method, and then you just print the count. done. periodt. π
π« SUBROUTINES/METHODS π«
π new()
the class constructor, bestie. and right now? at this very moment? it literally just calls RoPkg::DBObject->new() and minds its own business. so if you wanna know about the new() parameters, go read the RoPkg::DBObject manual page β it's all over there, and it's lowkey required reading. π
π Count($fields)
returns the number of mirrors from the database. the $fields parameter holds a list of WHERE clauses β you know, the "who, what, which ones" of it all. and for more details on $fields, go check SQL::Abstract. it's giving delegation and we respect it. β¨
π§ Get($fields, $orderby)
returns an array of RoPkg::Simba::Mirror objects β actual objects, not vibes, okay? the mirrors get read straight from the database.
$fields= a list ofWHEREclauses. again, more details over inSQL::Abstract. π$orderby= a reference to an array holding the fields specification used for sorting the data. so you control the order, you're the main character here. π
π DIAGNOSTICS π
want to run the diagnostics? unpack the source, and hit it with:
make test
that's the whole instruction. go off. π₯
πΈ CONFIGURATION AND ENVIRONMENT πΈ
this module does not use any configuration files. it does not use any environment variables. nothing. zero. it's self-sufficient, it doesn't need your dotfiles, it doesn't need your .env. a queen who needs nothing. π
π DEPENDENCIES π
RoPkg::DBCollectionRoPkg::Excludes
those two. that's the whole squad. π«Ά
β INCOMPATIBILITIES β
None known to the author. no drama, no feuds, no beef. we love a peaceful era. π
π BUGS AND LIMITATIONS π
None known to the author. nothing to report, bestie. flawless behaviour, allegedly. β¨
π PERL CRITIC π
this module is perl critic level 2 compliant. level 2!! it got graded and it passed and we're proud. π
π SEE ALSO π
RoPkg::SimbaRoPkg::Simba::MirrorSQL::Abstract
read them, love them, they're family. π¦
π AUTHOR π
Subredu Manuel <diablo@iasi.roedu.net> β the legend, the icon, the moment. π
π 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 β so if you want the legal fine print, that's where it lives. no cap. π«Ά
and that's the whole page, bestie. you understood it, you absorbed it, you're basically a RoPkg::Simba::Mirrors expert now. slay. π
β¨
this little rewrite was generated from the perl v5.28.1 documentation, dated 2018-12-09, for RoPkg:...Mirrors(3pm) β big love to whoever wrote the original, and big love to you for reading. bye bestie!! πππ¦
π¦ 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