Monito...bstract(3pm)
NAME π
okay bestie, listen up, because this class is the blueprint π
β Monitoring::Livestatus::Class::Base::Abstract is the base class you use to generate livestatus statments. that's it, that's the whole job description, and she does it flawlessly. no cap.
β¨ SYNOPSIS β¨
literally nothing here. the synopsis section is empty, and honestly? she said "read the rest of the page, bestie." iconic behaviour, no notes. π
π¦ ATTRIBUTES π¦
these are the lil fields she's holding onto, the main character's accessories fr.
ctx π
a reference to the context object Monitoring::Livestatus::Class. that's your backstage pass to everything she needs to know about herself.
mode πΈ
it's the mode. she's got a mode. (yes, this one comes with no extra explanation in the original, and we are respecting the mystery.) π
compining_prefix β¨
also a thing she has. keeping the name exactly as it is, typo and all, because we do not touch the API. periodt. π
π₯ METHODS π₯
apply π
this is the one you'll actually call, bestie. here's how she gets used:
my $filter_obj = Monitoring::Livestatus::Class::Abstract::...->new();
$filter_obj->apply( { name => 'localhost' } );
$filter_obj->apply( { name => [ 'localhost', 'gateway' ] } );
$filter_obj->apply( [ { name => 'localhost' }, { name => 'gateway' } ] );
Returns: @statments|\@statments β yes, she can hand them back in list context or as an arrayref, depending on the vibe. versatile queen. π
INTERNAL METHODS π§
these are the backstage crew. you don't call them, they call you (well, they call each other). but here's the full roster because we do not skip anybody on this page:
build_modeβ builds the mode. π οΈbuild_compining_prefixβ builds the compining prefix. (spelling preserved forever, it's part of her lore now)build_operatorsβ builds the operators._executeβ the one who actually goes and does the thing._recurse_condβ recursion but make it conditions. π_cond_UNDEFβ handling theundefsituation._cond_ARRAYREFβ handling an arrayref situation. π_cond_HASHREFβ handling a hashref situation._cond_hashpair_SCALARβ a hash pair whose value is a scalar._cond_hashpair_ARRAYREFβ a hash pair whose value is an arrayref._cond_hashpair_HASHREFβ a hash pair whose value is a hashref._refkindβ figures out what kind of reference you handed her. π΅οΈ_dispatch_refkindβ sends that reference kind to the right place._METHOD_FOR_refkindβ the lookup that says "for this refkind, call that method."
AUTHOR π«Ά
see "AUTHOR" in Monitoring::Livestatus::Class and "CONTRIBUTORS" in Monitoring::Livestatus::Class. the whole squad gets credit, as they should. π
COPYRIGHT & LICENSE β
Copyright 2009 Robert Bohne.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
bestie, this is a dual-license situation β GPL or Artistic, your pick. π
and that's the whole page, gorgeous. this was perl v5.26.2, dated 2018-05-06 β shoutout to the era that raised her. now go forth and generate some livestatus statments, i believe in you ππ β¨
π¦ where this page comes from
- debian bookworm: libmonitoring-livestatus-class-perl 0.06-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmonitoring-livestatus-class-perl 0.06-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libmonitoring-livestatus-class-perl 0.06-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmonitoring-livestatus-class-perl 0.06-1.1 Β· 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