1Dpkg::Source::Format(3perl)      libdpkg-perl      Dpkg::Source::Format(3perl)
2
3
4

NAME

6       Dpkg::Source::Format - manipulate debian/source/format files
7

DESCRIPTION

9       This module provides a class that can manipulate Debian source package
10       debian/source/format files.
11

METHODS

13       $f = Dpkg::Source::Format->new(%opts)
14           Creates a new object corresponding to a source package's
15           debian/source/format file. When the key filename is set, it will be
16           used to parse and set the format. Otherwise if the format key is
17           set it will be validated and used to set the format.
18
19       $f->set_from_parts($major[, $minor[, $variant]])
20           Sets the source format from its parts. The $major part is
21           mandatory.  The $minor and $variant parts are optional.
22
23           Notice: This function performs no validation.
24
25       ($major, $minor, $variant) = $f->set($format)
26           Sets (and validates) the source $format specified. Will return the
27           parsed format parts as a list, the optional $minor and $variant
28           parts might be undef.
29
30       ($major, $minor, $variant) = $f->get()
31       $format = $f->get()
32           Gets the source format, either as properly formatted scalar, or as
33           a list of its parts, where the optional $minor and $variant parts
34           might be undef.
35
36       $count = $f->parse($fh, $desc)
37           Parse the source format string from $fh, with filehandle
38           description $desc.
39
40       $count = $f->load($filename)
41           Parse $filename contents for a source package format string.
42
43       $str = $f->output([$fh])
44       "$f"
45           Returns a string representing the source package format version.
46           If $fh is set, it prints the string to the filehandle.
47
48       $f->save($filename)
49           Save the source package format into the given $filename.
50

CHANGES

52   Version 1.00 (dpkg 1.19.3)
53       Mark the module as public.
54
55
56
571.21.21                           2023-07-19       Dpkg::Source::Format(3perl)
Impressum