RoPkg:...Exclude(3pm)
๐ NAME ๐
RoPkg::Simba::Exclude โ yes bestie, this is the page for RoPkg:...Exclude(3pm), living its best life in the User Contributed Perl Documentation section, and we are going to read it together like the iconic little class it is. ๐
โจ VERSION โจ
0.1.2 โ she's a lil vintage but she still slays, no cap. ๐
๐ธ DESCRIPTION ๐ธ
RoPkg::Simba::Exclude is the class that simba uses to mess with an exclude list. That's literally her whole job and she does it flawlessly. โจ
She comes with all the basic sql methods already loaded up โ inherited straight from RoPkg::DBObject, so you don't gotta write them yourself. Main character inheritance energy, fr fr. ๐
๐ฆ SYNOPSIS ๐ฆ
Okay so here's how you actually use her, copy-paste this and you're golden:
!#/usr/bin/perl
use RoPkg::DB;
use RoPkg::Simba::Exclude;
sub main {
my $dbp = new RoPkg::DB();
$dbp->Add('dbi:mysql:database=mysql;host=localhost',
'root',
'',
'local');
my $c = new RoPkg::Simba::Exclude(db => $dbp, db_method => 'db_local');
$c->id(1);
$c->Load();
}
main();
Look at that. Gorgeous. No notes. ๐
๐ง SUBROUTINES/METHODS ๐ง
Heads up bestie, this is important: all methods besides new will raise an OutsideClass exception if you try to call them outside of a class instance. Like, she does NOT do random strangers. ๐
โโ๏ธ
Also, some methods may raise diferent exceptions depending on the vibe. So please, please, please read the section where the method you care about is described to find out more info about those exceptions. It's giving "read the room" but make it documentation. ๐
๐ new()
The class constructor, the origin story, the birth of a star. ๐ At this moment in time, she just calls RoPkg::DBObject->new(). That's it, that's the whole thing.
If you want the tea on what parameters new() takes, go read the RoPkg::DBObject manual page, bestie. ๐
๐ table()
Returns the name of the exclude lists database table. Just the name. Simple queen behaviour. ๐
๐ ExList()
Get/set the excluded items. ๐
When you pick the set behaviour, you must pass the exclude list into the method. And lowkey important: the exclude list has to be set before you add the new exclude list to the database. Order matters, don't skip steps. โญ
๐ AddItems(@new_items)
Adds @new_items to the list of excluded items, and returns the new number of excluded items. So you always know how many lil guys are on the list now. ๐งฎโจ
๐ GetItems()
Returns the list of excluded items. ๐
And in scalar context? She returns the number of excluded items instead. Context-sensitive icon. ๐
The following methods are get/set methods for all fields of a mirror.
idMirrorIDCommandID
๐ Add()
Adds the mirror to the database. ๐๏ธโจ
This method is a wrapper for RoPkg::DBObject::SQL_Insert.
On success, 0 is returned. On error, a DBI exception is raised. No cap.
๐ Delete()
Deletes the current exclude list from the database. ๐๐๏ธ
Before you call this one, you should set the id of the exclude list. If you don't set the id, a Param::Missing exception gets raised. She said "where's the id, bestie?" ๐ญ
On database operation success, 0 is returned. On database error, a DBI exception is raised.
๐ Update()
Updates the current exclude list object with the database. ๐๐
Before calling this method, you should set the id of the exclude list. If you don't set the id, a Param::Missing exception is raised. Same energy as Delete(), she is consistent. ๐
On database operation success, 0 is returned. On database error, a DBI exception is raised.
๐ Load()
Loads the exclude list from the database, into the current object. ๐ฅ๐ฆ
Before calling this method you should have set id, or MirrorID and CommandID. If none of those are found, then Param::Missing is raised. Give her something to work with, please. ๐
On database operation success, 0 is returned. On database error, a DBI exception is raised.
๐ฅ 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. Zero. None. She's low maintenance like that. ๐ง
๐ DEPENDENCIES ๐
RoPkg::DBObjectRoPkg::Exceptions
๐ซ INCOMPATIBILITIES ๐ซ
None known to the author. Clean slate, no drama. โจ
๐ BUGS AND LIMITATIONS ๐
None known to the author. (Famous last words, but we're choosing to believe. ๐ซถ)
๐ PERL CRITIC ๐
This module is perl critic level 2 compliant โ with 1 exception. One single exception. We do not discuss it. ๐
๐ SEE ALSO ๐
RoPkg::Simba::ExcludesRoPkg::ExceptionsRoPkg::Object
๐ AUTHOR ๐
Subredu Manuel <diablo@iasi.roedu.net> โ legend, icon, and 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 โ go read it if you want the fine print, bestie. ๐
Okay that's the whole page, and if you made it all the way down here: slay. This was perl v5.28.1, dated 2018-12-09, and yes, RoPkg:...Exclude(3pm) is still that girl. Bye bestie, go exclude some packages responsibly. ๐ฆโจ๐
๐ฆ 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