Debian::Javahelper::Java(3)

πŸ’– Debian::Javahelper::Java(3) β€” the javahelper core library, bestie πŸ’–

okay so you're looking at Debian::Javahelper::Java, which is, like, the core library of javahelper. this is Debian::Javahelper::Java(3), section 3, and it's the little communal brain cell that all the javahelpers share. pretty iconic of it honestly. πŸ‘‘


✨ NAME ✨

Debian::Javahelper::Java β€” Javahelper core library. that's it. that's the name. it does exactly what it says on the tin. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

so here's the vibe, in code:

use Debian::Javahelper::Java;

my @paths = scan_javadoc("/usr/share/doc/libfreemarker-doc/api/");
print "Freemarker is linked to the following APIs: \n - ",
      join("\n - ", @paths), "\n";
my @packnames = find_package_for_existing_files("/bin/ls",
                "/bin/bash");
print "/bin/ls and /bin/bash are installed via: ",
      join(", ", @packnames), "\n";

like. look at her go. 🫢 scan some javadoc, find out which package owns which file, print it all out cute. no notes.


🌸 DESCRIPTION 🌸

This module is used by various javahelpers to share common code. (one brain cell, many hands. communal. slay.) πŸ’ž

⚠️ BIG WARNING BESTIE, READ THIS ONE ⚠️ Please note this API is not stable and backwards compatibility is not guaranteed at the current time. if you're out here wanting a stable API, please contact the maintainers and be like "hey besties can we lock this down". πŸ”’

πŸŽ€ Methods πŸŽ€

πŸ’œ scan_javadoc($path)

Scans the javadoc at $path and returns a list of javadocs it is linked to on the system.

Currently it ignores all javadocs linked via other locations than /usr/share/doc β€” and it also makes an assumption that the linked javadoc lives in /usr/share/doc/<package>/<dir-or-symlink>. of course, all Java Policy compliant packages provide their javadoc from there, so like, it's fine, it's chill, everyone's on the same page. ✨

If /usr/share/doc/<package>/<dir-or-symlink> appears to be a symlink, then it is followed β€” except for default-jdk-doc. that one gets left alone, no following, we respect its boundaries. πŸ™ˆ

πŸ’™ find_package_for_existing_files(@files)

Consults dpkg(1) to see which packages provide @files and returns this list. every single entry in @files must exist (but it is not required to be files) and should not be used on a directory. also, all entries must be given with an absolute path. no relative paths, no vibes-based paths, absolute or nothing. 🚫

🩡 parse_manifest_fd($fd, $filename)

Parses a manifest from $fd, which must be a readable filehandle, and returns a Debian::Javahelper::Manifest.

$filename is only used to report parsing errors and should be something that identifies the source of $fd. it's the "who dis" label for error messages, basically. πŸ“›

πŸ’š write_manifest_fd($manifest, $fd, $filename)

Writes $manifest to the writable filehandle $fd. $manifest must be a Debian::Javahelper::Manifest.

$filename is only used to report errors and should be something that identifies $fd. again with the labeling, it's giving organized. 🏷️

πŸ’› write_manifest_section_fd($section, $fd, $filename)

Writes $section to the writable filehandle $fd. $section must be a Debian::Javahelper::ManifestSection.

$filename is only used to report errors and should be something that identifies $fd.

🫣 NB: Helper - Not exported. so don't come for it in your use line, it's not coming out to play. it lives inside, behind the velvet rope. πŸŽ€

🀍 slurp_file($file)

Reads all lines in $file and returns them as a list. yes it's called slurp. yes that's the real name. we love her. πŸ“

πŸ™ˆ NB: Helper - Not exported. same deal β€” internal girlie, not on the export list. πŸ’…

🌈 SEE ALSO 🌈

go read those next, bestie, they're literally right there. link in bio energy. πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

Niels Thykier <niels@thykier.net> β€” the icon, the legend, the actual moment. 🌟


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. free as in freedom, free as in go wild (responsibly, per the license). πŸ•ŠοΈ


and that's the whole page, bestie!! this was Debian::Javahelper::Java(3) from Javahelper, version 0.82, dated 2026-05-17. slay, ate, no crumbs left β€” now go write some manifests and hydrate. πŸ’§βœ¨πŸ’…

πŸ“¦ where this page comes from