Dpkg::Deps::Simple - represents a single dependency statement
This class represents a single dependency statement. It has several interesting properties:
The package name (can be undef if the dependency has not been initialized or if the simplification of the dependency lead to its removal).
The relational operator: "=", "<<", "<=", ">=" or ">>". It can be undefined if the dependency had no version restriction. In that case the following field is also undefined.
The list of architectures where this dependency is applicable. It is undefined when there's no restriction, otherwise it is an array ref. It can contain an exclusion list, in that case each architecture is prefixed with an exclamation mark.
The arch qualifier of the dependency (can be undef if there is none). In the dependency "python:any (>= 2.6)", the arch qualifier is "any".
The restrictions formula for this dependency. It is undefined when there is no restriction formula. Otherwise it is an array ref.
Creates a new object. Some options can be set through %opts:
Sets the host architecture.
Sets the build architecture.
Specifies whether the parser should consider it a build dependency. Defaults to 0.
Specifies whether the parser should consider it a tests dependency. Defaults to 0.
Clears any dependency information stored in $dep so that $dep->is_empty() returns true.
Parses the dependency string and modifies internal properties to match the parsed dependency.
Parse a dependency line from a filehandle.
Parse a dependency line from $filename.
Returns a string representing the dependency. If $fh is set, it prints the string to the filehandle.
Save the dependency into the given $filename.
Returns 1 when $dep implies $other_dep. Returns 0 when $dep implies NOT($other_dep). Returns undef when there is no implication. $dep and $other_dep do not need to be of the same type.
Returns a list of sub-dependencies, which for this object it means it returns itself.
This method is a no-op for this object.
Returns true if the dependency applies to the indicated architecture.
Simplifies the dependency to contain only information relevant to the given architecture. This object can be left empty after this operation. This trims off the architecture restriction list of these objects.
Returns the package name if the dependency applies only to a subset of architectures.
Returns true if the dependency applies to the indicated profile.
Simplifies the dependency to contain only information relevant to the given profile. This object can be left empty after this operation. This trims off the profile restriction list of this object.
Evaluates the dependency given a list of installed packages and a list of virtual packages provided. These lists are part of the Dpkg::Deps::KnownFacts object given as parameters.
Returns 1 when it's true, 0 when it's false, undef when some information is lacking to conclude.
Simplifies the dependency as much as possible given the list of facts (see class Dpkg::Deps::KnownFacts) and a list of other dependencies that are known to be true.
Returns true if the dependency is empty and doesn't contain any useful information. This is true when the object has not yet been initialized.
Returns true if $dep could be modified to represent the union of both dependencies. Otherwise returns false.
New methods: Add $dep->profile_is_concerned() and $dep->reduce_profiles().
New method: Add $dep->reset().
New property: recognizes the arch qualifier "any" and stores it in the "archqual" property when present.
Mark the module as public.
To install Dpkg, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.