Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

debian::javahelper::manifestsection(3) [debian man page]

Debian::Javahelper::ManifestSection(3)				    Javahelper				    Debian::Javahelper::ManifestSection(3)

NAME
Debian::Javahelper::ManifestSection - Javahelper representation of a section in a Jar Manifest SYNOPSIS
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(); DESCRIPTION
This module is used to represent a Section in a Java Manifest. Constants MAIN_SECTION A constant denoting the main section of the manifest. Exported by default. Methods Debian::Javahelper::ManifestSection->new($name) Creates a new section - if $name is MAIN_SECTION, then it will set "Manifest-Version" otherwise it will set "Name" to $name. Generally you should not need to use this directly! The Debian::Javahelper::Manifest will create sections as they are needed. There is no support for creating a section and then adding it to a manifest after wards. $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. $value may not contain newlines. 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. $section->get_value($attr[, $empty]) Returns the value of $attr, long values are merged into a single line. $attr is looked up case-insensitively. Returns undef if $attr is not present in the section, unless $empty is a truth-value. In this case it will return ''. $section->get_values() Returns all the values in the section in a list of [$attr, $value] pairs. "Manifest-Version" and "Name" will appear first in this list if they appear in this section, the remaining attributes appears in any order and this order may change. Modifying the list or the pairs will not affect the attributes in the section. Note: The $attr part will be the original case of the attribute. SEE ALSO
Debian::Javahelper::Manifest(3) - for how to obtain a section. AUTHOR
Niels Thykier <niels@thykier.net> 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. 0.43 2011-02-17 Debian::Javahelper::ManifestSection(3)

Check Out this Related Man Page

Debian::Javahelper::Java(3)					    Javahelper					       Debian::Javahelper::Java(3)

NAME
Debian::Javahelper::Java - Javahelper core library. SYNOPSIS
use Debian::Javahelper::Java; my @paths = scan_javadoc("/usr/share/doc/libfreemarker-doc/api/"); print "Freemarker is linked to the following APIs: - ", join(" - ", @paths), " "; my @packnames = find_package_for_existing_files("/bin/ls", "/bin/bash"); print "/bin/ls and /bin/bash are installed via: ", join(", ", @packnames), " "; DESCRIPTION
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 $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 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 @files and returns this list. All entries in @files must 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. $filename is only used to report parsing errors and should be something that identifies the source of $fd. 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. 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. slurp_file($file) Reads all lines in $file and returns them as a list. NB: Helper - Not exported. SEE ALSO
Debian::Javahelper::Manifest(3) Debian::Javahelper::ManifestSection(3) AUTHOR
Niels Thykier <niels@thykier.net> 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. 0.43 2012-01-10 Debian::Javahelper::Java(3)
Man Page