List(3pm)
π 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
$idxis 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 π
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
- arch rolling: lire 2.1.1-8 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms