info > Dpkg::Control::HashCore

📋 NAME

Dpkg::Control::HashCore - parse and manipulate a block of RFC822-like fields

🚀 Quick Reference

Use CaseCommandDescription
⚡ Create new control hashDpkg::Control::Hash->new()Create a new hash object with RFC822-like fields
📥 Parse control file$c->parse($fh, $description)Parse control data from a filehandle
📄 Load control file$c->load($file)Parse control data from a file path
📤 Output control data$c->output()Get string representation of control fields
💾 Save control data$c->save($filename)Write control data to a file
🔍 Find custom field$c->find_custom_field($name)Find a user-specific field by name pattern
🔄 Apply substitutions$c->apply_substvars($substvars)Replace variable references with values

📝 DESCRIPTION

The 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

📋 CHANGES

📦 Version 1.02 (dpkg 1.21.0)

📦 Version 1.01 (dpkg 1.17.2)

📦 Version 1.00 (dpkg 1.17.0)

1.21.1 2025-09-09 Dpkg::Control::HashCore(3perl)

Dpkg::Control::HashCore
📋 NAME 🚀 Quick Reference 📝 DESCRIPTION ⚙️ METHODS 📋 CHANGES
📦 Version 1.02 (dpkg 1.21.0) 📦 Version 1.01 (dpkg 1.17.2) 📦 Version 1.00 (dpkg 1.17.0)

Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-25 20:43 @216.73.217.127
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!