Debian...parated(3pm)
π Debian::Control::Stanza::CommaSeparated(3pm) π
okay bestie, welcome to the perl user-contributed documentation for Debian::Control::Stanza::CommaSeparated β yes that name is a whole mouthful, we know, but she's worth it π«Ά
πΈ NAME πΈ
Debian::Control::Stanza::CommaSeparated β the comma separated debian/control field abstraction, and yes she ate π
β¨ SYNOPSIS β¨
my $f = Debian::Control::Stanza::CommaSeparated->new(
'Joe M <joem@there.not>');
$f->add('"Smith, Agent" <asmith@hasyou.not>, Joe M <joem@there.not>');
print $f->as_string;
# 'Joe M <joem@there.not>, "Smith, Agent" <asmith@hasyou.not>'
print "$f"; # the same
$f->sort;
look at her go, no cap π
π¦ DESCRIPTION π¦
so basically Debian::Control::Stanza::CommaSeparated handles the whole comma-separated-list-of-values situation for you β the kind of thing that lives in debian/control file fields like Uploaders. it's giving "I have a list and I want it parsed, deduped and tidy," and honestly? iconic.
lowkey important tea tho: the various dependency fields indebian/controlalso use comma-separated values, BUT theDebian::Dependenciesclass is the more suitable one for those π because it can do extra stuff like finding overlapping dependency declarations. so don't come for this class for dependency drama, she's not that girl for that job π
π CONSTRUCTOR π
new (initial values)β the initial values list gets parsed, and it's totally allowed to contain strings that are actually comma-separated lists already. those get split up all nicely usingText::ParseWords'quotewordsroutine β¨ so you can just hand her the messy thing and she'll sort it out.
π METHODS π
as_stringβ returns the text representation of the list. it's literally just a simple join of the elements by", ". and the exact same function is used for overloading the stringification operation, so"$f"hits the same code path, periodt.add @itemsβ adds the given items to the list π«Ά items that are already present are not added, so the list stays unique. no duplicates, no chaos, we love a clean list.sortβ a handy method for sorting the list β she does exactly what it says on the tin, and it's handy fr fr.
π SEE ALSO π
ngl there's no SEE ALSO section in this one bestie, but the vibes mention Debian::Dependencies up in DESCRIPTION if that's your moment π
that's the whole page, no notes π β brought to you by perl v5.40.1, dated 2026-05-08, straight out of the Debian...parated(3pm) era of Documentation. mwah ππ
π¦ where this page comes from
- ubuntu stonking: libdebian-source-perl 0.133 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms