Debian::Javahelper::Java3
Javahelper core library.
Usage
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";
Overview
This module is used by various javahelpers to share common code.
Please note this API is not stable and backwards compatibility is not guaranteed at the current time. Please contact the maintainers if you are interested in a stable API.
Methods
- scan_javadoc($path)
-
Scans the javadoc at
$pathand 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 is in /usr/share/doc/<package>/<dir-or-symlink>. Of course, all Java Policy compliant packages provide their javadoc from there.
If /usr/share/doc/<package>/<dir-or-symlink> appears to be a symlink, then it is followed (except for default-jdk-doc).
- find_package_for_existing_files(@files)
-
Consults dpkg(1) to see which packages provides
@filesand returns this list. All entries in@filesmust exists (but is not required to be files) and should not be used on a directory.Furthermore all entries must be given with absolute path.
- parse_manifest_fd($fd, $filename)
-
Parses a manifest from
$fd, which must be a readable filehandle, and returns a Debian::Javahelper::Manifest.$filenameis only used to report parsing errors and should be something that identifies the source of$fd.
- write_manifest_fd($manifest, $fd, $filename)
-
Writes
$manifestto the writable filehandle$fd.$manifestmust be a Debian::Javahelper::Manifest.$filenameis only used to report errors and should be something that identifies$fd.
- write_manifest_section_fd($section, $fd, $filename)
-
Writes
$sectionto the writable filehandle$fd.$sectionmust be a Debian::Javahelper::ManifestSection.$filenameis only used to report errors and should be something that identifies$fd.NB: Helper - Not exported.
- slurp_file($file)
-
Reads all lines in
$fileand returns them as a list.NB: Helper - Not exported.
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.
Releases
8 releases since Debian 6.0 (Squeeze); the text changed 6 times.