List(3pm)

πŸ“¦ version 2.1.1, in arch rolling

πŸ’… List(3pm) β€” like, the whole manual but make it make sense

okay bestie so this is Lire::Config::List, and it lives in the LogReport's Lire Documentation corner of the universe. It's a manual page, it's a Perl module, and honestly? It's giving "small but mighty." Let's get into it ✨


🌸 NAME 🌸

Lire::Config::List β€” the List Value Object. yes that's the whole name. short king. πŸ‘‘


πŸŽ€ DESCRIPTION πŸŽ€

So here's the vibe: this thing is used for configuration parameters that hold a list of values. Like, not one value β€” a whole little array of them. That's the entire premise and she serves it. πŸ“


πŸ¦‹ elements() πŸ¦‹

Returns this list's values as an array of Lire::Config::Value objects.

that's it. that's the method. it hands you the whole squad, one by one, all wrapped up as Lire::Config::Value objects. no cap. πŸ’–


πŸ¦‹ get( $idx ) πŸ¦‹

Returns the value stored at index $idx of this list.

⚠️ heads up bestie: an exception is thrown if the index is out-of-bounds. so like, don't ask for index 47 when there's three things in the list. she WILL yell at you. 😭

πŸ¦‹ remove( $idx ) πŸ¦‹

Removes the value stored at index $idx of this list.

⚠️ same deal β€” an exception is thrown if the index is out-of-bounds. out of bounds = out of luck, fr fr.

and the cute part? it returns the deleted element. so you get to keep the thing you just yeeted. iconic behavior honestly. πŸ’€


πŸ¦‹ clear() πŸ¦‹

Removes all elements from this list.

nuclear option. everything gone. fresh start. main character energy 🌈 (no leftovers, no crumbs)


πŸ¦‹ append( $val, [ $idx ] ) πŸ¦‹

Adds $val to after element $idx.

  • If $idx is omitted, the element will be added at the end of the array. (default behavior, the classic, the safe choice 🫢)
  • A negative index is interpreted relative to the end of the array. yes queen, negative indexing, we love to see it ✨

πŸ¦‹ move( $idx, $new_idx ) πŸ¦‹

Moves element $idx at position $new_idx.

Indices can be negative and are interpreted as position relative to the end of the array. so you can shuffle things around from the back of the list like a little gremlin and it just works 🧚


πŸ¦‹ set( $idx, $value ) πŸ¦‹

Replaces value at index $idx with $value.

swapping one thing out for another. glow-up in place. no need to remove and re-append like some kind of amateur πŸ’…


✨ AUTHOR ✨

The one, the only:

Wessel Dankers <wsl@logreport.org>

put some respect on the name 🫢


⭐ VERSION ⭐

$Id: List.pm,v 1.16 2006/07/23 13:16:30 vanbaal Exp $

copy-pasted exactly because bestie, that's a literal identifier string, we do NOT paraphrase those πŸ’–


Copyright (C) 2002-2004 Stichting LogReport Foundation LogReport@LogReport.org

This file is part of Lire.

Lire is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html.

🫢 okay real talk for one sec: that warranty disclaimer is not a joke and not me being dramatic β€” it's literally in the license. no guarantees, bestie. read the GPL. it eats. πŸ”₯

✨ and that's the whole page, you're officially an expert ✨

this little number shipped as part of Lire 2.1.1, dated 2025-09-28, and that's the sign-off β€” mwah πŸ’‹ see you in the next manpage, bestie πŸ’œ

πŸ“¦ where this page comes from