Debian::Control::Stanza(3pm) | User Contributed Perl Documentation | Debian::Control::Stanza(3pm) |
Debian::Control::Stanza - single stanza of Debian source package control file
package Binary; use base 'Debian::Control::Stanza'; use constant fields => qw( Package Depends Conflicts ); 1;
Debian::Control::Stanza is the base class for Debian::Control::Stanza::Source and Debian::Control::Stanza::Binary classes.
Stanza fields are to be defined in the class method fields. Typically this can be done like:
use constant fields => qw( Foo Bar Baz );
Fields that are to contain dependency lists (as per "is_dependency_list" method below) are automatically converted to instances of the Debian::Dependencies class.
User-defined fields are supported. These start with "X", optionally followed by "S", "B" or "C", then "_", capital letter and other letters and digits.
Examples: "X_Moon_Phase", "XS_Hemisphere".
See <https://www.debian.org/doc/debian-policy/#user-defined-fields>.
You may use dashes for initial field names, but these will be converted to underscores:
my $s = Debian::Control::Stanza::Source( {Build-Depends => "perl"} ); print $s->Build_Depends;
By default the following fields are flagged to contain such lists:
Fields that are comma-separated use one line per item, except if they are like "${some:Field}", in which case they are wrapped at $widthth column. $width defaults to 80.
Copyright (C) 2009, 2017 Damyan Ivanov dmn@debian.org
Copyright (C) 2020 gregor herrmann gregoa@debian.org
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.
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.
2023-02-21 | perl v5.36.0 |