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 the Manifest-Version attribute. 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 back undef, or β€” if $create is a truth-value β€” it makes a whole new empty section with that name. Growth mindset. ✨ Use the MAIN_SECTION constant 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 $other into $manifest. Every section in $other gets added to $manifest if 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 πŸ‘€


🌈 AUTHOR 🌈

Niels Thykier <niels@thykier.net> β€” the mastermind, no cap. 🫢


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