# man > Dpkg(3perl)

---
type: CommandReference
command: Dpkg
mode: perldoc
section: 3perl
source: perldoc
---

## Quick Reference
- `$Dpkg::PROGNAME` — name of current program
- `$Dpkg::ADMINDIR` — dpkg database directory path
- `$Dpkg::CONFDIR` — dpkg configuration directory path
- `$Dpkg::PROGVERSION` — version of the dpkg suite
- `use Dpkg;` — load the core module
- `use Dpkg::Arch;` — architecture handling functions
- `use Dpkg::Deps;` — parse and manipulate dependencies

## Name
Dpkg - Perl module with core variables for the dpkg suite

## Synopsis
perl
use Dpkg;

print "$Dpkg::PROGNAME version $Dpkg::PROGVERSION\n";
print "Admin directory: $Dpkg::ADMINDIR\n";
## Description
The `Dpkg` module provides a set of variables containing paths and names relevant to the dpkg system installation. It also serves as the entry point to the `Dpkg` module hierarchy.

## Variables
- `$Dpkg::PROGNAME` — name of the current program.
- `$Dpkg::PROGVERSION` — version of the dpkg suite.
- `$Dpkg::PROGMAKE` — name of the system GNU make program.
- `$Dpkg::PROGTAR` — name of the system GNU tar program.
- `$Dpkg::PROGPATCH` — name of the system GNU patch program (or directory traversal resistant alternative).
- `$Dpkg::CONFDIR` — path to the dpkg system configuration directory.
- `$Dpkg::ADMINDIR` — path to the dpkg database directory.
- `$Dpkg::LIBDIR` — path to the dpkg methods and plugins directory.
- `$Dpkg::DATADIR` — path to the dpkg architecture tables directory.

## Modules
The following public modules are part of the `Dpkg` hierarchy (version 1.00 or higher):

- `Dpkg` — this module, core variables.
- `Dpkg::Arch` — architecture handling functions.
- `Dpkg::Build::Info` — build information functions.
- `Dpkg::BuildFlags` — set, modify and query compilation build flags.
- `Dpkg::BuildOptions` — parse and manipulate `DEB_BUILD_OPTIONS`.
- `Dpkg::BuildProfiles` — parse and manipulate build profiles.
- `Dpkg::Changelog` — parse changelogs.
- `Dpkg::Changelog::Entry` — represents a changelog entry.
- `Dpkg::Changelog::Parse` — generic changelog parser for `dpkg-parsechangelog`.
- `Dpkg::Checksums` — generate and parse checksums.
- `Dpkg::Compression` — simple database of available compression methods.
- `Dpkg::Compression::FileHandle` — transparently compress and decompress files.
- `Dpkg::Compression::Process` — wrapper around compression tools.
- `Dpkg::Conf` — parse dpkg configuration files.
- `Dpkg::Control` — parse and manipulate Debian control information.
- `Dpkg::Control::Changelog` — represent fields output by `dpkg-parsechangelog`.
- `Dpkg::Control::Fields` — manage (list of known) control fields.
- `Dpkg::Control::Hash` — parse and manipulate a block of RFC822-like fields.
- `Dpkg::Control::Info` — parse files like `debian/control`.
- `Dpkg::Control::Tests` — parse files like `debian/tests/control`.
- `Dpkg::Control::Tests::Entry` — represents a `debian/tests/control` stanza.
- `Dpkg::Deps` — parse and manipulate dependencies.
- `Dpkg::Deps::Simple` — represents a single dependency statement.
- `Dpkg::Deps::Multiple` — base module to represent multiple dependencies.
- `Dpkg::Deps::Union` — list of unrelated dependencies.
- `Dpkg::Deps::AND` — list of AND dependencies.
- `Dpkg::Deps::OR` — list of OR dependencies.
- `Dpkg::Deps::KnownFacts` — list of installed and virtual packages.
- `Dpkg::Exit` — push, pop and run exit handlers.
- `Dpkg::Gettext` — wrapper around `Locale::gettext`.
- `Dpkg::IPC` — spawn sub-processes and feed/retrieve data.
- `Dpkg::Index` — collections of `Dpkg::Control` (e.g., `Packages`/`Sources` files).
- `Dpkg::Interface::Storable` — base object serializer.
- `Dpkg::Path` — common path handling functions.
- `Dpkg::Source::Format` — parse and manipulate `debian/source/format` files.
- `Dpkg::Source::Package` — extract Debian source packages.
- `Dpkg::Substvars` — substitute variables in strings.
- `Dpkg::Vendor` — identify current distribution vendor.
- `Dpkg::Version` — parse and manipulate Debian package versions.

## Changes
- **Version 2.00 (dpkg 1.20.0)**: Removed deprecated variables: `$version`, `$progname`, `$admindir`, `$dpkglibdir`, `$pkgdatadir`.
- **Version 1.03 (dpkg 1.18.24)**: Added `$PROGPATCH`.
- **Version 1.02 (dpkg 1.18.11)**: Added `$PROGTAR`, `$PROGMAKE`.
- **Version 1.01 (dpkg 1.17.0)**: Introduced new variables `$PROGNAME`, `$PROGVERSION`, `$CONFDIR`, `$ADMINDIR`, `$LIBDIR`, `$DATADIR`; deprecated old ones.

## See Also
- [`dpkg(1)`](https://www.chedong.com/phpMan.php/man/dpkg/1/markdown) — Debian package manager
- [`Dpkg::Arch(3perl)`](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AArch/markdown) — architecture handling
- [`Dpkg::Deps(3perl)`](https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ADeps/markdown) — dependency parsing

## License
Each module contains its own license information in the header comment.