MediaW...nstants(3pm)
π MediaWiki::Bot::Constants β the constants page, bestie edition π
okay so this is the manual for MediaWiki::Bot::Constants (that's the 3pm page, she's a Perl module doc, iconic), version 5.007000 β constants for MediaWiki::Bot. yes the whole point is constants. no cap. π
β¨ CONSTANTS β¨
so the constants come in 5 tags and you can import each tag on its own, which is lowkey the whole vibe:
- err β the error constants, and she inherited these from
MediaWiki::APIπ - bool β boolean constants, simple queen behavior
- page β page existence
- file β file (image/media) existence status, and heads up bestie: this one is NOT boolean
- ns β some namespace numbers. Achtung! Incomplete! Use
MediaWiki::Bot's functions for getting namespace information for your wiki.
π«Ά friendly reminder that ns is giving "partial data" energy, so don't build your whole namespace situation on it.
π EXPORTS π
by default? nothing. No symbols are exported by default. zero. nada. π
The available tags are err, bool, page, file, ns, and all. that's the whole roster, collect them all β
π¦ SYNOPSIS π¦
here's how you actually use her:
use MediaWiki::Bot;
use MediaWiki::Bot::Constants qw(:file);
my $bot = MediaWiki::Bot->new();
my $file_existence = $bot->test_image_exists("File:...");
# Make sense of MediaWiki::Bot's random numbers
if ($file_existence == FILE_LOCAL) {
# Get from local media repository
}
elsif ($file_existence == FILE_SHARED) {
# Get from shared (remote) media repository
}
see how MediaWiki::Bot was out here returning random numbers and now you're translating them into actual meaning? that's the glow up β¨
π DESCRIPTION π
Exportable constants used by MediaWiki::Bot. Use these constants in your code to avoid the use of magical numbers, and to ensure compatibility with future changes in "MediaWiki::Bot".
basically: no more mysterious integers floating around your code like they own the place. the constants keep you compatible when things change later. main character code, fr fr.
you can also import :constants or any constant name(s) straight from MediaWiki::Bot:
use MediaWiki::Bot qw(:constants);
use MediaWiki::Bot qw(PAGE_NONEXISTENT);
π AVAILABILITY π
The project homepage is <https://metacpan.org/module/MediaWiki::Bot>.
The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a CPAN site near you, or see <https://metacpan.org/module/MediaWiki::Bot/>.
π₯ SOURCE π₯
The development version is on github at <https://github.com/MediaWiki-Bot/MediaWiki-Bot> and may be cloned from <git://github.com/MediaWiki-Bot/MediaWiki-Bot.git>
π BUGS AND LIMITATIONS π
You can make new bug reports, and view existing ones, through the web interface at <https://github.com/MediaWiki-Bot/MediaWiki-Bot/issues>.
(go drop your bug reports bestie, they want them, it's not weird, it's community π)
π AUTHORS π
the icons behind this whole operation:
- Dan Collins <dcollins@cpan.org>
- Mike.lifeguard <lifeguard@cpan.org>
- Alex Rowe <alex.d.rowe@gmail.com>
- Oleg Alexandrov <oleg.alexandrov@gmail.com>
- jmax.code <jmax.code@gmail.com>
- Stefan Petrea <stefan.petrea@gmail.com>
- kc2aei <kc2aei@gmail.com>
- bosborne@alum.mit.edu
- Brian Obio <brianobio@gmail.com>
- patch and bug report contributors πΈ
π COPYRIGHT AND LICENSE π
This software is Copyright (c) 2021 by the MediaWiki::Bot team <perlwikibot@googlegroups.com>.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
and that's the whole page, bestie!! this was perl v5.32.1, dated 2021-11-12, and the page itself is MediaWiki::Bot::Constants(3pm) β go forth and stop using magical numbers, you absolute legend π«Άπβ¨
π¦ where this page comes from
- debian bookworm: libmediawiki-bot-perl 5.007000-1 Β· GPL-3.0-only
- debian trixie: libmediawiki-bot-perl 5.007000-1 Β· GPL-3.0-only
- ubuntu jammy: libmediawiki-bot-perl 5.007000-1 Β· GPL-3.0-only
- ubuntu noble: libmediawiki-bot-perl 5.007000-1 Β· GPL-3.0-only
- ubuntu resolute: libmediawiki-bot-perl 5.007000-1 Β· GPL-3.0-only
- ubuntu stonking: libmediawiki-bot-perl 5.007000-1 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms