Alt::Base(3pm)
π NAME π
Alt::Base β bestie, it's the base class for alternate modules. That's the whole vibe. β¨
β¨ VERSION β¨
version 0.02 β yes she's small, she's mighty, she's giving humble icon. π
πΈ SYNOPSIS πΈ
okay so first, over in your Alt/Foo/Bar/phrase.pm, you're gonna do this:
# in your Alt/Foo/Bar/phrase.pm:
package Alt::Foo::Bar::phrase;
use base qw(Alt::Base);
1;
and if you wanna customize options, it's literally the same thing plus one extra line, no biggie:
# customize options:
package Alt::Foo::Bar::phrase;
use base qw(Alt::Base);
our %ALT = (check => 0, ...);
1;
see? easy. slay. π
π¦ DESCRIPTION π¦
so Alt::Base is the class that hands out all the common functionalities an alternate module needs β like, the shared group-chat utilities of the Alt world. if you wanna know more about the whole Alt concept, go read Alt, she explains everything. π«Ά
Alt::Base defines an import() routine that goes looking for options inside %ALT. and these are the options, bestie:
check => BOOL(default:1) β if you set this to true (and true is the default, so this is the main character behavior), a whole lil checklist happens. first: it checks that the alternate module is actually namedAlt::<<Original::Module>::<phrase>. then: it loadsAlternate::Moduleand checks that the package variable$ALTis defined with the value ofphrase. why?? because we wanna make sure we're loading the correct module, and sometimes we genuinely do want to make sure about this, no cap. the wrong module can get loaded, for example if the user reinstalls the original distribution or some other alternate distribution. and if any of that fails?
Will die upon failure. π like, dead. gone. no recovery arc.
-
π SEE ALSO π
Alt
π AUTHOR π
Steven Haryanto <stevenharyanto@gmail.com> β the legend herself. π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2012 by Steven Haryanto.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. (free as in freedom, bestie, go wild π)
and that's the whole page!! this little angel shipped as part of perl v5.36.0, dated 2022-12-08, and it lives under User Contributed Perl Documentation β periodt. πβ¨π¦
π¦ where this page comes from
- debian bookworm: libalt-base-perl 0.2-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libalt-base-perl 0.2-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libalt-base-perl 0.2-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libalt-base-perl 0.2-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libalt-base-perl 0.2-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms