Monito...bstract(3pm)

πŸ“¦
version 0.06 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

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 the undef situation.
  • _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 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