Debian::Javah...anifestSection(3)
π NAME π
Debian::Javahelper::ManifestSection β bestie, this is Javahelper's whole little representation of one single section inside a Jar Manifest. One section. That's her job. She's iconic. β¨
π¦ SYNOPSIS π¦
okay so here's how you'd actually use her:
use Debian::Javahelper::Manifest;
my $main_sec = $manifest->get_section(MAIN_SECTION, 1);
# set the Main-Class attribute
$main_sec->set_value('Main-Class', 'org.site.app.AppStarter');
# read the classpath entry - may return undef if the attribute does not exist.
my $cp = $main_sec->get_value('Class-Path');
# same as above except $cp will be '' if the attribute does not exist.
$cp = $main_sec->get_value('Class-Path', 1);
# returns a list of [$name, $value] pairs - note $name will be in the original
# case.
my @att = $main_sec->get_values();
like. she's literally just here to hold attributes for you. no cap. π
πΈ DESCRIPTION πΈ
So this module is the girl who represents a Section in a Java Manifest. That's it, that's the whole thing, and she does it beautifully. π
β¨ Constants β¨
MAIN_SECTIONβ a constant that denotes the main section of the manifest. She's exported by default, so she just shows up, uninvited, slaying. π«Ά
π Methods π
Debian::Javahelper::ManifestSection->new($name)
Creates a new section. Here's the tea: if $name is MAIN_SECTION, then it will set "Manifest-Version", otherwise it will set "Name" to $name.
ngl generally you should not need to use this directly, bestie! The Debian::Javahelper::Manifest will create sections as they are needed. Also there is no support for creating a section and then adding it to a manifest afterwards. so don't try it, she's not that kind of girl. π
$section->set_value($attr, $value)
Sets the value of $attr to $value. If $attr did not exist in this section, then it will be created. And listen β $value may not contain newlines. that's the rule, periodt. π
Note: $attr exists if an attribute matches $attr ignoring the case of the two. When $attr is created, the original case will be stored for later (for writing). Later updates to $attr will not affect the original case. she remembers how she met you. π
$section->get_value($attr[, $empty])
Returns the value of $attr, and long values are merged into a single line. $attr is looked up case-insensitively β she's chill like that. π
Returns undef if $attr is not present in the section, unless $empty is a truth-value. In that case it will return ''. so you get an empty string instead of a whole undef situation. much cuter. π
$section->get_values()
Returns all the values in the section, as a list of [$attr, $value] pairs. And here's the ordering lore: "Manifest-Version" and "Name" will appear first in this list if they appear in this section. The remaining attributes appear in any order and this order may change. chaotic but valid. β¨
Modifying the list or the pairs will not affect the attributes in the section. no side effects, we love to see it. π«Ά
Note: the $attr part will be the original case of the attribute.
π SEE ALSO π
Debian::Javahelper::Manifest(3)β for how to obtain a section. go ask her, she's the one handing out sections. π
π AUTHOR π
Niels Thykier <niels@thykier.net> β the icon, the legend, the moment. π
π COPYRIGHT AND LICENSE π
Copyright 2010 by Niels Thykier
This module is free software; you may redistribute it and/or modify it under the terms of GNU GPL 2. slay. π
fr fr, that's the whole page, bestie. you're so ready for this module now. π¦
version 0.82, dated 2026-05-17 β mwah, go forth and manifest your manifests. β¨π
π¦ where this page comes from
- ubuntu stonking: javahelper 0.82 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms