Debian::Javahelper::Manifest(3)
π Debian::Javahelper::Manifest π
okay bestie, so this is Debian::Javahelper::Manifest, a lil Perl module from the Javahelper fam (manual section 3, iykyk) and it's literally the representation of a Jar Manifest. That's the whole vibe. Jar Manifests, but make it an object. π«Ά
β¨ SYNOPSIS β¨
use Debian::Javahelper::Java;
my $manifest = ...;
my $main_sec = $manifest->get_section(MAIN_SECTION);
# Create if it does not exist.
my $file_sec = $manifest->get_section("java/lang/Object.class", 1);
πΈ DESCRIPTION πΈ
This module is the moment where a Java Manifest gets an object to live in. That's it, that's the job. π
π Constants π
MAIN_SECTIONβ a constant that denotes the main section of the manifest. It's exported by default, so it just shows up in your namespace, no asking required. π
π¦ Methods π¦
Debian::Javahelper::Manifest->new()β creates a brand new manifest. Fresh out the box it only contains the main section with theManifest-Versionattribute. Baby's first manifest. π$manifest->get_section($name[, $create])β hands you back the section named by$name. If that section doesn't exist yet, it either gives you backundef, or β if$createis a truth-value β it makes a whole new empty section with that name. Growth mindset. β¨ Use theMAIN_SECTIONconstant to get at the main section of the manifest, fr fr.$manifest->get_sections()β returns a list of literally every section in$manifest. The main section is always first in the list, and the rest get sorted in name order. Okay but here's the tea: modifying the list itself won't change which sections are present in$manifest, but modifying a section in this list will also update the section in the manifest. Same object, bestie, no copy. π$manifest->merge($other)β merges all the entries in$otherinto$manifest. Every section in$othergets added to$manifestif it's not already there.
If an attribute in a given section is only present in one of the two manifests, then that attribute and its value will be in $manifest once merge returns. If the attribute in a given section is present in both manifests, then the value from $other wins. Sorry to the original, $other ate. π
And get this β you can use it to make a deep copy of a manifest:
my $copy = Debian::Javahelper::Manifest->new();
$copy->merge($orig);
iconic.
π SEE ALSO π
Debian::Javahelper::Java(3)β it's got the parse/write methods for manifests.Debian::Javahelper::ManifestSection(3)β for how sections are handled.
π AUTHOR π
Niels Thykier <niels@thykier.net> β the mastermind, no cap. π«Ά
π 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.
okay that's the whole page bestie, go forth and manifest β¨π this was version 0.82, dated 2026-05-17, from the Debian::Javahelper::Manifest(3) manual page β slay, bye! π ππ¦
π¦ 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