Dpkg::Deps::Multiple(3perl) libdpkg-perl Dpkg::Deps::Multiple(3perl)

# [NAME](#NAME)

Dpkg::Deps::Multiple - base module to represent multiple dependencies

# [DESCRIPTION](#DESCRIPTION)

The Dpkg::Deps::Multiple module provides objects implementing various types of dependencies. It is the base class for Dpkg::Deps::{AND,OR,Union}.

# [METHODS](#METHODS)

$dep = Dpkg::Deps::Multiple-&gt;new(@deps);

Creates a new object, with the list of dependencies in @deps.

$dep-&gt;**reset()**

Clears any dependency information stored in $dep so that $dep-&gt;**is\_empty()** returns true.

$dep-&gt;add(@deps)

Adds new dependency objects at the end of the list.

@dep\_list = $dep-&gt;**get\_deps()**

Returns a list of sub-dependencies.

$dep-&gt;**sort()**

Sorts alphabetically the internal list of dependencies.

$bool = $dep-&gt;arch\_is\_concerned($arch)

Returns true if at least one of the sub-dependencies apply to this architecture.

$dep-&gt;reduce\_arch($arch)

Simplifies the dependencies to contain only information relevant to the given architecture. The non-relevant sub-dependencies are removed.

This trims off the architecture restriction list of Dpkg::Deps::Simple objects.

@pkgname\_list = $dep-&gt;**has\_arch\_restriction()**

Returns the list of package names that have such a restriction.

$bool = $dep-&gt;**profile\_is\_concerned()**

Returns true if at least one of the sub-dependencies apply to this profile.

$dep-&gt;**reduce\_profiles()**

Simplifies the dependencies to contain only information relevant to the given profile. The non-relevant sub-dependencies are removed.

This trims off the profile restriction list of Dpkg::Deps::Simple objects.

$bool = $dep-&gt;**is\_empty()**

Returns true if the dependency is empty and doesn't contain any useful information. This is true when a (descendant of) Dpkg::Deps::Multiple contains an empty list of dependencies.

$bool = $dep-&gt;merge\_union($other\_dep)

This method is not meaningful for this object, and will always croak.

# [CHANGES](#CHANGES)

## [Version 1.02 (dpkg 1.17.10)](#Version_1.02_%28dpkg_1.17.10%29)

New methods: Add $dep-&gt;**profile\_is\_concerned()** and $dep-&gt;**reduce\_profiles()**.

## [Version 1.01 (dpkg 1.16.1)](#Version_1.01_%28dpkg_1.16.1%29)

New method: Add $dep-&gt;**reset()**.

## [Version 1.00 (dpkg 1.15.6)](#Version_1.00_%28dpkg_1.15.6%29)

Mark the module as public.

2026-09-09 1.23.11-dirty

---

Document: Dpkg::Deps::Multiple(3perl) from dpkg 1.23.11-r2 (Chainguard OS)
Source: https://git.dpkg.org/git/dpkg/dpkg.git
