RoPkg:...Command(3pm)
π RoPkg::Simba::Command β the perl manual page, but make it make sense π
okay bestie, you found the RoPkg:...Command(3pm) page in the perl docs, and honestly? it's giving niche but powerful. let's get into it π«Ά
β¨ NAME β¨
RoPkg::Simba::Command
like, that's the whole name. that's the class. periodt. π
πΈ VERSION πΈ
0.1.2
she's a lil baby version but she's doing her best π
π¦ DESCRIPTION π¦
RoPkg::Simba::Command is the class that simba uses to mess with a command. think of it as the little handler that knows how to poke at one single command record.
and plot twist: it also comes with the basic sql methods, which it inherits from RoPkg::DBObject. so it's not doing all the heavy lifting itself, it's standing on the shoulders of its parent class. iconic behavior honestly π
π SYNOPSIS π
here's how you actually use it, no cap:
!#/usr/bin/perl
use RoPkg::DB;
use RoPkg::Simba::Command;
sub main {
my $dbp = new RoPkg::DB();
$dbp->Add('dbi:mysql:database=mysql;host=localhost',
'root',
'',
'local');
my $c = new RoPkg::Simba::Command(db => $dbp, db_method => 'db_local');
$c->id(1);
$c->Load();
}
main();
so you spin up a RoPkg::DB, register a connection with Add(), make yourself a RoPkg::Simba::Command with db and db_method, set the id, and then Load() it. that's the whole ritual bestie, go off β¨
π SUBROUTINES/METHODS π
heads up, important rules time: every single method except new raises an OutsideClass exception if you call it outside a class instance. so like, don't just be calling these into the void, okay? π
also some methods raise their own special little exceptions. when that's the case, we say it in that method's section so you know exactly what you're getting into. no surprises here π
π new()
the class constructor. right now it literally just calls RoPkg::DBObject->new(). that's it. that's the whole thing.
if you wanna know what params you can pass to new(), go read the RoPkg::DBObject manual page, because this one's just forwarding the vibe π
π table()
returns the name of the commands database table. simple. clean. slay.
and now, the following methods are the get/set methods for all the fields of a mirror:
idPathArgs
(yes, it says mirror, we're reporting what the page says, we don't make the rules π«Ά)
π Add()
adds the mirror to the database. this method is a wrapper for RoPkg::DBObject::SQL_Insert.
- on success,
0is returned β - on error, a
DBIexception is raised π
π Delete()
deletes the current command from the database.
before you call this, you gotta set theidof the command. if you don't set theid, aParam::Missingexception is raised. no id, no delete, that's the law βοΈ
- on database operation success,
0is returned β - on database error, a
DBIexception is raised π
π Update()
updates the current command object with the database.
before you call this, you gotta set theidof the command. if you don't set theid, aParam::Missingexception is raised.
- on database operation success,
0is returned β - on database error, a
DBIexception is raised π
π Load()
loads the command from the database into the current object.
before you call this you should have setid. ifidis not set, thenParam::Missingis raised. π₯
- on database operation success,
0is returned β - on database error, a
DBIexception is raised π
π DIAGNOSTICS π
this module comes with his own tests (that's the page's wording, we love him for it). to run them: unpack the source, and use the make test commmand. (yes, "commmand". we're keeping the typo. it's part of the lore now π)
π§ CONFIGURATION AND ENVIRONMENT π§
this module doesn't use configuration files and environment variables. nothing to configure. she just is. π
β DEPENDENCIES β
RoPkg::DBObjectRoPkg::Exceptions
π INCOMPATIBILITIES π
None known to the author. (so, like, keep it cute and hopefully it stays that way π«Ά)
π BUGS AND LIMITATIONS π
None known to the author. (the author said it, not us, don't come for us π)
π₯ PERL CRITIC π₯
the code is perl critic level 2 compliant (with one exception). one single exception. we don't know which one. she's mysterious like that β¨
π¦ SEE ALSO π¦
RoPkg::Simba::CommandsRoPkg::ExceptionsRoPkg::Object
go read those too bestie, they're the extended universe π
π 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 page!! this was documented by perl v5.28.1 on 2018-12-09, and honestly it ate. bye bestie, go load some commands π
β¨π«Ά
π¦ 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