.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" 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::ManifestSection 3" .TH Debian::Javahelper::ManifestSection 3 "2023-07-29" "0.79" "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::ManifestSection \- Javahelper representation of a section in a Jar Manifest .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Debian::Javahelper::Manifest; \& \& my $main_sec = $manifest\->get_section(MAIN_SECTION, 1); \& # set the Main\-Class attribute \& $main_sec\->set_value(\*(AqMain\-Class\*(Aq, \*(Aqorg.site.app.AppStarter\*(Aq); \& # read the classpath entry \- may return undef if the attribute does not exist. \& my $cp = $main_sec\->get_value(\*(AqClass\-Path\*(Aq); \& # same as above except $cp will be \*(Aq\*(Aq if the attribute does not exist. \& $cp = $main_sec\->get_value(\*(AqClass\-Path\*(Aq, 1); \& # returns a list of [$name, $value] pairs \- note $name will be in the original \& # case. \& my @att = $main_sec\->get_values(); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is used to represent a Section in 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::ManifestSection\->new($name)" 4 .IX Item "Debian::Javahelper::ManifestSection->new($name)" Creates a new section \- if \fB\f(CB$name\fB\fR is \s-1MAIN_SECTION,\s0 then it will set \&\*(L"Manifest-Version\*(R" otherwise it will set \*(L"Name\*(R" to \fB\f(CB$name\fB\fR. .Sp 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. .ie n .IP "$section\->set_value($attr, $value)" 4 .el .IP "\f(CW$section\fR\->set_value($attr, \f(CW$value\fR)" 4 .IX Item "$section->set_value($attr, $value)" Sets the value of \fB\f(CB$attr\fB\fR to \fB\f(CB$value\fB\fR. If \fB\f(CB$attr\fB\fR did not exist in this section then it will be created. \fB\f(CB$value\fB\fR may not contain newlines. .Sp Note: \fB\f(CB$attr\fB\fR exists if an attribute matches \fB\f(CB$attr\fB\fR ignoring the case of the two. When \fB\f(CB$attr\fB\fR is created, the original case will be stored for later (for writing). Later updates to \fB\f(CB$attr\fB\fR will not affect the original case. .ie n .IP "$section\->get_value($attr[, $empty])" 4 .el .IP "\f(CW$section\fR\->get_value($attr[, \f(CW$empty\fR])" 4 .IX Item "$section->get_value($attr[, $empty])" Returns the value of \fB\f(CB$attr\fB\fR, long values are merged into a single line. \fB\f(CB$attr\fB\fR is looked up case-insensitively. .Sp Returns \fBundef\fR if \fB\f(CB$attr\fB\fR is not present in the section, unless \&\fB\f(CB$empty\fB\fR is a truth-value. In this case it will return ''. .ie n .IP "$section\->\fBget_values()\fR" 4 .el .IP "\f(CW$section\fR\->\fBget_values()\fR" 4 .IX Item "$section->get_values()" Returns all the values in the section in a list of [$attr, \f(CW$value\fR] pairs. \*(L"Manifest-Version\*(R" and \*(L"Name\*(R" will appear first in this list if they appear in this section, the remaining attributes appears in any order and this order may change. .Sp Modifying the list or the pairs will \fInot\fR affect the attributes in the section. .Sp Note: The \fB\f(CB$attr\fB\fR part will be the original case of the attribute. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBDebian::Javahelper::Manifest\fR\|(3) \- for how to obtain a section. .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