.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Debian::Javahelper::Manifest 3" .TH Debian::Javahelper::Manifest 3 "2020-09-06" "0.76" "Javahelper" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Debian::Javahelper::Manifest \- Javahelper representation of a Jar Manifest .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& 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); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is used to represent a Java Manifest. .SS "Constants" .IX Subsection "Constants" .IP "\s-1MAIN_SECTION\s0" 4 .IX Item "MAIN_SECTION" A constant denoting the main section of the manifest. .Sp Exported by default. .SS "Methods" .IX Subsection "Methods" .IP "Debian::Javahelper::Manifest\->\fBnew()\fR" 4 .IX Item "Debian::Javahelper::Manifest->new()" Creates a new manifest. It will only contain the main section with the Manifest-Version attribute. .ie n .IP "$manifest\->get_section($name[, $create])" 4 .el .IP "\f(CW$manifest\fR\->get_section($name[, \f(CW$create\fR])" 4 .IX Item "$manifest->get_section($name[, $create])" Returns the section denoted by \fB\f(CB$name\fB\fR. If this section does not exist, then it will either return \fBundef\fR or (if \fB\f(CB$create\fB\fR is a truth-value) create a new empty section with that name. .Sp Use the \s-1MAIN_SECTION\s0 constant to access the main section of the manifest. .ie n .IP "$manifest\->\fBget_sections()\fR" 4 .el .IP "\f(CW$manifest\fR\->\fBget_sections()\fR" 4 .IX Item "$manifest->get_sections()" Returns a list of all sections in \fB\f(CB$manifest\fB\fR. The main section will always be the first in the list, and the remaining sections will be sorted in name order. .Sp Modifying the list will not change which sections are present in \&\fB\f(CB$manifest\fB\fR, but modifying a section in this list will also update the section in the manifest. .ie n .IP "$manifest\->merge($other)" 4 .el .IP "\f(CW$manifest\fR\->merge($other)" 4 .IX Item "$manifest->merge($other)" Merge all entries in \fB\f(CB$other\fB\fR into \fB\f(CB$manifest\fB\fR. All sections in \&\fB\f(CB$other\fB\fR will be added to \fB\f(CB$manifest\fB\fR if they are not already present. .Sp 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 \fB\f(CB$manifest\fB\fR after merge returns. .Sp If the attribute in a given section is present in both manifests, then the value from \fB\f(CB$other\fB\fR will be used. .Sp This can be used to make a deep copy a manifest: .Sp .Vb 2 \& my $copy = Debian::Javahelper::Manifest\->new(); \& $copy\->merge($orig); .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBDebian::Javahelper::Java\fR\|(3) \- had parse/write methods for manifests. \&\fBDebian::Javahelper::ManifestSection\fR\|(3) \- for how sections are handled. .SH "AUTHOR" .IX Header "AUTHOR" Niels Thykier .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright 2010 by Niels Thykier .PP This module is free software; you may redistribute it and/or modify it under the terms of \s-1GNU GPL 2.\s0