.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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::Control 3pm" .TH Debian::Control 3pm 2024-05-11 "perl v5.38.2" "User Contributed Perl Documentation" .\" 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::Control \- manage Debian source package control files .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 9 \& my $c = Debian::Control\->new(); # construct a new \& $c\->read($file); # parse debian/control file \& $c\->write($file); # write to file \& print $c\->source\->Source; \& print $c\->source\->Build_Depends; # Debian::Dependencies object \& $c\->binary\->{\*(Aqlibfoo\-perl\*(Aq}\->Description( \& "Foo Perl module\en" . \& " Foo makes this and that" \& ); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" Debian::Control can be used for representation and manipulation of Debian source package control files in an object-oriented way. It provides easy reading and writing of the \fIdebian/control\fR file found in Debian source packages. .SH FIELDS .IX Header "FIELDS" .IP source 4 .IX Item "source" An instance of Debian::Control::Stanza::Source class. Contains the source stanza of the Debian source package control file. .IP binary 4 .IX Item "binary" A hash reference with keys being binary package names and values instances of Debian::Control::Stanza::Binary class. Contains the information of the binary package stanzas of Debian source package control file. .IP binary_tie 4 .IX Item "binary_tie" A Tie::IxHash object tied to the \fBbinary\fR hash. .SH CONSTRUCTOR .IX Header "CONSTRUCTOR" .IP new 4 .IX Item "new" Constructs a new Debian::Control instance. .Sp The \f(CW\*(C`source\*(C'\fR field is initialized with an empty instance of Debian::Control::Stanza::Source and \f(CW\*(C`binary\*(C'\fR field is initialized with an empty instance of Tie::IxHash. .SH METHODS .IX Header "METHODS" .IP "read \fIfile\fR" 4 .IX Item "read file" Parse "control" in debian and populate \f(CW\*(C`source\*(C'\fR and \f(CW\*(C`binary\*(C'\fR accessors. .Sp \&\fIfile\fR can be either a file name, an opened file handle or a string scalar reference. .IP "write \fIfile\fR" 4 .IX Item "write file" Writes a debian/control\-like file in \fIfile\fR with the contents defined in the \&\f(CW\*(C`source\*(C'\fR and \f(CW\*(C`binary\*(C'\fR fields. .Sp \&\fIfile\fR can be either a file name, an opened file handle or a string scalar reference. .Sp All dependency lists are sorted before writing. .IP is_arch_dep 4 .IX Item "is_arch_dep" Returns true if the package is architecture-dependent. This is determined by the \f(CW\*(C`Architecture\*(C'\fR field of the first binary package. If it equals to \f(CW\*(C`all\*(C'\fR, then the package is architecture-independent; otherwise it is architecture-dependent. .Sp Returns \fIundef\fR if it is not possible to determine whether the package is architecture-dependent or not. This is the case when there are no binary package stanzas present or the first has no \f(CW\*(C`Archiitecture\*(C'\fR field. .SH "SEE ALSO" .IX Header "SEE ALSO" Debian::Control::Stanza::Source, Debian::Control::Stanza::Binary, Debian::Control::FromCPAN .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" Copyright (C) 2009 Damyan Ivanov dmn@debian.org .PP This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. .PP This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.