LINTIAN::DATA::JOINEDLINES(3)

πŸ’– Lintian::Data::JoinedLines(3) πŸ’–

okay bestie, so this is the Lintian::Data::JoinedLines manual page from the Lintian Debian Package Checker set (section 3, the library pages πŸ‘‘). It's literally the Lintian interface to query lists of keywords. no cap. let's go πŸ¦‹


✨ NAME ✨

Lintian::Data::JoinedLines β€” the Lintian interface for querying lists of keywords πŸ’…


🌸 SYNOPSIS 🌸

my $keyword;
my $list = Lintian::Data::JoinedLines->new('type');
if ($list->recognizes($keyword)) {
    # do something ...
}
my $hash = Lintian::Data::JoinedLines->new('another-type', qr{\s++});
if ($hash->value($keyword) > 1) {
    # do something ...
}
if ($list->value($keyword) > 1) {
    # do something ...
}
my @keywords = $list->all_entries;
if ($list->matches_any($keyword)) {
    # do something ...
}

πŸŽ€ DESCRIPTION πŸŽ€

So Lintian::Data::JoinedLines gives you a whole way of loading a list of keywords or key/value pairs from a file that lives in the Lintian root, and then querying that list 🫢. The lists are stored in the data directory of the Lintian root and they consist of one keyword or key/value pair per line, periodt. Blank lines and lines beginning with # are ignored, and leading and trailing whitespace is stripped ✨.

If you ask for it, the lines get split into key/value pairs with a given separator regular expression. Otherwise, keywords are taken verbatim exactly as they are listed in the file, and yes, they may include spaces πŸ’–.

This module is the reason lists like menu sections, doc-base sections, obsolete packages, package fields, and so forth can just live in simple, easily editable files. iconic behavior honestly 🌈.

NB: By default Lintian::Data::JoinedLines is lazy and defers loading of the data file until it is actually needed. it's giving "we'll get there when we get there" 😌

πŸ’œ Interface for the CODE argument πŸ’œ

This section is all about the glow-up between the CODE argument and the class method new, bestie.

The sub will be called once for each key/pair with three arguments, KEY, VALUE and CURVALUE. The first two are the key/value pair parsed from the data file, and CURVALUE is the current value associated with the key. CURVALUE will be undef the first time the sub is called with that KEY argument πŸ‘€.

Then the sub can modify VALUE in some way and return the new value for that KEY. If CURVALUE is not undef, the sub may return undef to indicate that the current value should still be used. 🚨 But it is not permissible for the sub to return undef if CURVALUE is undef. don't do it.

Where Perl semantics allow it, the sub can modify CURVALUE and the changes will be reflected in the result πŸ’…. As an example, if CURVALUE is a hashref, new keys can be inserted etc. slay.


πŸ‘‘ INSTANCE METHODS πŸ‘‘

  • dataset β€” yes bestie, it's here, listed with no description, and we are respecting it πŸ’€
  • "keyorder" β€” also here, also with no description, also iconic for existing πŸŽ€
  • all_entries β€” Returns all keywords listed in the data file as a list in original order. In a scalar context, returns the number of keywords. main character energy fr fr.
  • recognizes (KEY) β€” Returns true if KEY was listed in the data file represented by this Lintian::Data::JoinedLines instance, and false otherwise. vibe check passed or not, no in-between ✨.
  • resembles (KEY) β€” Returns true if the data file contains a key that is a case-insensitive match to KEY, and false otherwise. so it's like, "close enough bestie?" πŸ¦‹
  • value (KEY) β€” Returns the value attached to KEY if it was listed in the data file represented by this Lintian::Data::JoinedLines instance, and the undefined value otherwise. if it's not there, it's giving undef 🫠.
  • matches_any(KEYWORD[, MODIFIERS]) β€” Returns true if KEYWORD matches any regular expression listed in the data file. The optional MODIFIERS serve as modifiers on all regexes. ✨ very "one for all" of it.
  • load β€” another one listed with no description. living its best mysterious life πŸ’…

πŸ“ FILES πŸ“

  • LINTIAN_INCLUDE_DIR/data β€” The files loaded by this module must be located in this directory. Relative paths containing a / are permitted, so files may be organized in subdirectories in this directory. get organized bestie πŸ“βœ¨

Note that lintian supports multiple LINTIAN_INCLUDE_DIRs. yes, more than one, we love options πŸ’–


🌟 AUTHOR 🌟

Originally written by Russ Allbery <rra@debian.org> for Lintian. we stan πŸ‘‘


🌈 SEE ALSO 🌈

lintian(1), <https://lintian.debian.org/manual/section-2.6.html>


and that's the whole page, babe πŸ’– this was Lintian v2.139.0ubuntu2, dated 2026-10-08, and the manpage name is Lintian::Da...JoinedLines(3) (yes the header truncates it, that's just how it displays, don't come for me 😭). go query some keyword lists, you've got this πŸ«ΆπŸ’…βœ¨

πŸ“¦ where this page comes from