Dpkg::Control::HashCore - Online Linux Manual PageSection : 3perl
Updated : 2021-04-13
Source : 1.20.9
Note : libdpkg-perl

NAMEDpkg::Control::HashCore − parse and manipulate a block of RFC822−like fields

DESCRIPTIONThe Dpkg::Control::Hash class is a hash-like representation of a set of RFC822−like fields. The fields names are case insensitive and are always capitalized the same when output (see field_capitalize function in Dpkg::Control::Fields). The order in which fields have been set is remembered and is used to be able to dump back the same content. The output order can also be overridden if needed. You can store arbitrary values in the hash, they will always be properly escaped in the output to conform to the syntax of control files. This is relevant mainly for multilines values: while the first line is always output unchanged directly after the field name, supplementary lines are modified. Empty lines and lines containing only dots are prefixed with ​ . (space + dot) while other lines are prefixed with a single space. During parsing, trailing spaces are stripped on all lines while leading spaces are stripped only on the first line of each field.

METHODS$c = Dpkg::Control::Hash−>new(%opts) Creates a new object with the indicated options. Supported options are: allow_pgp Configures the parser to accept OpenPGP signatures around the control information. Value can be 0 (default) or 1. allow_duplicate Configures the parser to allow duplicate fields in the control information. Value can be 0 (default) or 1. drop_empty Defines if empty fields are dropped during the output. Value can be 0 (default) or 1. name The user friendly name of the information stored in the object. It might be used in some error messages or warnings. A default name might be set depending on the type. is_pgp_signed Set by the parser (starting in dpkg 1.17.0) if it finds an OpenPGP signature around the control information. Value can be 0 (default) or 1, and undef when the option is not supported by the code (in versions older than dpkg 1.17.0). $c>set_options($option, %opts) Changes the value of one or more options. $value = $c>get_option($option) Returns the value of the corresponding option. $c>parse_error($file, $fmt, ...) Prints an error message and dies on syntax parse errors. $c>parse($fh, $description) Parse a control file from the given filehandle. Exits in case of errors. ​$description is used to describe the filehandle, ideally it's a filename or a description of where the data comes from. It's used in error messages. When called multiple times, the parsed fields are accumulated. Returns true if some fields have been parsed. $c>load($file) Parse the content of $file. Exits in case of errors. Returns true if some fields have been parsed. $c>find_custom_field($name) Scan the fields and look for a user specific field whose name matches the following regex: /X[SBC]*−$name/i. Return the name of the field found or undef if nothing has been found. $c>get_custom_field($name) Identify a user field and retrieve its value. $str = $c>output() ``$c'' Get a string representation of the control information. The fields are sorted in the order in which they have been read or set except if the order has been overridden with set_output_order(). $c>output($fh) Print the string representation of the control information to a filehandle. $c>save($filename) Write the string representation of the control information to a file. $c>set_output_order(@fields) Define the order in which fields will be displayed in the output() method. $c>apply_substvars($substvars) Update all fields by replacing the variables references with the corresponding value stored in the Dpkg::Substvars object.

CHANGES

Version 1.01 (dpkg 1.17.2)New method: $c>parse_error().

Version 1.00 (dpkg 1.17.0)Mark the module as public.
0
Johanes Gumabo
Data Size   :   14,416 byte
man-Dpkg::Control::HashCore.3perlBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 181,741
Visitor ID   :     :  
Visitor IP   :   18.219.255.63   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|Dpkg::Control::HashCore.3perl|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|Dpkg::Control::HashCore.3perl|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|Dpkg::Control::HashCore.3perl|43|br══─}─══|'br══─}─══ )         (htmlprn|149|Dpkg::Control::HashCore.3perl|43|'br══─}─══ |'br══─}─══ )