This page summarizes big and global changes that need to be done to the perl API (from libdpkg-perl), some of which might require bumping the major module VERSION as they might be too intrusive.
This is an initial brain dump.
Dpkg::Interface::Storable: The Interface name here does seem superfluous, remove. https://pause.perl.org/pause/query?ACTION=pause_namingmodules
- Dpkg::Build*: Some of the modules are namespaced as Build::* some others as Build*, unify.
- Dpkg::Control: Get rid of this mess, start from scratch on a new Dpkg::Deb822 hierarchy (there's a pu branch around). Some of the problems are:
- Cyclic dependencies due to the vendoring hooks applied on the base modules and the Dpkg::Vendor hierarchy using Dpkg::Control as a parent (that's why we currently have the *Core mess), instead of applying them on the specific file format modules.
- Several of the file formats are missing Dpkg::Control modules. All of them should have a proper module to import, with sane defaults, etc.
- The tied hash implementation makes the modules very slow (remove the tie as part of the base API, if at all make it a separate module that can be tied after the fact).
- The field capitalization handling makes the modules very slow. These should always be assumed to be in lc on APi entry (or lc otherwise) and only output in their canonical capitalization form on output.
- While a unified list of fields looks nice, it has the problem that the fields are context sensitive and they might change semantics or format depending on the file they are found in. These need to be specific to those modules. Probably some of the field function handling can be shared though, but not the field definitions.
- The list of supported digests on various file formats is tied to the supported list of digests from Dpkg::Checksums, which should be independent.
- Dpkg::Checksums: The interface is very confusing, the same functions are used to add and checksum files and to verify that the files have the same checksums.
- Dpkg::Changelog: This hierarchy is confusing and having to use the Parse module a bit inconsistent and annoying, rethink?
- Dpkg::Shlibs: Several of the modules here are objdump and/or ELF-specific, this would need to be untangled to makes this portable to systems such as Solaris, or Mac OS X which uses the Mach-O format.
- Unify the new() constructor behavior for Dpkg::Interface::Storable based modules, some load by default some do not.
- Dpkg::Vars: This needs to be moved somewhere else, the module name is very generic and non-descriptive.
- Dpkg::Path: Some of the functions here would better be placed in some other module. For example find_command() in Dpkg::IPC.
- Dpkg::Conf: Its interface is mostly catered as a serialization of command-line options into a configuration file, but setting and getting configuration values is made too difficult. See the commit 24a4f968635d60dde8bd2077d652096119e8d4f9 for a reverted attempt to switch the implementation to be hash based.