First(3pm)

πŸ“¦ version 2.1.1, in arch rolling

πŸ’… First(3pm) β€” aka Lire::First

okay so this is the manual page for First(3pm), bestie β€” a Perl module page from LogReport's Lire docs, and it's genuinely so much simpler than it looks. Let's get into it 🫢


✨ NAME ✨

Lire::First β€” the Lire class that implements the first operator. that's it. that's the whole name. slay.


πŸ¦‹ SYNOPSIS πŸ¦‹

use Lire::First

literally one line. iconic behaviour tbh πŸ‘‘


🌸 DESCRIPTION 🌸

so this class implements the first operator, right? what it does is: it outputs the first value that appears in its field, once the DLF records have been sorted according to the "sort_fields" attribute. πŸ’–

and if you don't set a sort order? the default sort order is the default timestamp sort. no cap, that's the fallback πŸ•


πŸŽ€ METHODS πŸŽ€

🌈 new( %params )

makes you a brand-new Lire::First object ✨

  • the field attribute? you can specify that in the "field" parameter πŸ’…
  • the sort order? pass that in the "sort_fields" parameter πŸ¦‹

⭐ sort_fields( [$new_sort_fields] )

returns the fields that are gonna be used to sort the DLF records. it's a reference to an array of DLF field names, iykyk πŸ“‹

if the $new_sort_fields parameter is set, then it becomes the new sort order. two things though, bestie, listen:

  • it must be an array reference 🫢
  • it should only contain valid field names for the current report specification's schema πŸ‘€

and when no sort_fields are set at all? the default is to use the default timestamp field πŸ•°οΈ


πŸ”₯ SEE ALSO πŸ”₯

go read those next, they're the whole friend group πŸ’œ


πŸ‘‘ AUTHORS πŸ‘‘

  • Francis J. Lacoste <flacoste@logreport.org>
  • Wolfang Sourdeau <wsourdeau@logreport.org>

🧚 VERSION 🧚

$Id: First.pm,v 1.15 2008/03/09 19:27:31 vanbaal Exp $

Copyright (C) 2001-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.

ok the all-caps warranty bits are not me being dramatic, that's genuinely how the license says it β€” no warranty, fr fr 😭

and that's the page!! πŸŽ€ this was Lire 2.1.1, dated 2025-09-28 β€” catch you on the next man page, bestie πŸŒΈπŸ’–

πŸ“¦ where this page comes from