{
    "mode": "perldoc",
    "parameter": "Dpkg::Deps::Simple",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3ADeps%3A%3ASimple/json",
    "generated": "2026-06-13T01:17:19Z",
    "sections": {
        "NAME": {
            "content": "Dpkg::Deps::Simple - represents a single dependency statement\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This class represents a single dependency statement. It has several interesting properties:\n\npackage\nThe package name (can be undef if the dependency has not been initialized or if the\nsimplification of the dependency lead to its removal).\n\nrelation\nThe relational operator: \"=\", \"<<\", \"<=\", \">=\" or \">>\". It can be undefined if the\ndependency had no version restriction. In that case the following field is also undefined.\n\nversion\nThe version.\n\narches\nThe list of architectures where this dependency is applicable. It is undefined when there's\nno restriction, otherwise it is an array ref. It can contain an exclusion list, in that case\neach architecture is prefixed with an exclamation mark.\n\narchqual\nThe arch qualifier of the dependency (can be undef if there is none). In the dependency\n\"python:any (>= 2.6)\", the arch qualifier is \"any\".\n\nrestrictions\nThe restrictions formula for this dependency. It is undefined when there is no restriction\nformula. Otherwise it is an array ref.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "$dep = Dpkg::Deps::Simple->new([$dep[, %opts]]);\nCreates a new object. Some options can be set through %opts:\n\nhostarch\nSets the host architecture.\n\nbuildarch\nSets the build architecture.\n\nbuilddep\nSpecifies whether the parser should consider it a build dependency. Defaults to 0.\n\ntestsdep\nSpecifies whether the parser should consider it a tests dependency. Defaults to 0.\n\n$dep->reset()\nClears any dependency information stored in $dep so that $dep->isempty() returns true.\n\n$dep->parsestring($depstring)\nParses the dependency string and modifies internal properties to match the parsed\ndependency.\n\n$dep->parse($fh, $desc)\nParse a dependency line from a filehandle.\n\n$dep->load($filename)\nParse a dependency line from $filename.\n\n$dep->output([$fh])\n\"$dep\"\nReturns a string representing the dependency. If $fh is set, it prints the string to the\nfilehandle.\n\n$dep->save($filename)\nSave the dependency into the given $filename.\n\n$dep->implies($otherdep)\nReturns 1 when $dep implies $otherdep. Returns 0 when $dep implies NOT($otherdep). Returns\nundef when there is no implication. $dep and $otherdep do not need to be of the same type.\n\n$dep->getdeps()\nReturns a list of sub-dependencies, which for this object it means it returns itself.\n\n$dep->sort()\nThis method is a no-op for this object.\n\n$dep->archisconcerned($arch)\nReturns true if the dependency applies to the indicated architecture.\n\n$dep->reducearch($arch)\nSimplifies the dependency to contain only information relevant to the given architecture.\nThis object can be left empty after this operation. This trims off the architecture\nrestriction list of these objects.\n\n$dep->hasarchrestriction()\nReturns the package name if the dependency applies only to a subset of architectures.\n\n$dep->profileisconcerned()\nReturns true if the dependency applies to the indicated profile.\n\n$dep->reduceprofiles()\nSimplifies the dependency to contain only information relevant to the given profile. This\nobject can be left empty after this operation. This trims off the profile restriction list\nof this object.\n\n$dep->getevaluation($facts)\nEvaluates the dependency given a list of installed packages and a list of virtual packages\nprovided. These lists are part of the Dpkg::Deps::KnownFacts object given as parameters.\n\nReturns 1 when it's true, 0 when it's false, undef when some information is lacking to\nconclude.\n\n$dep->simplifydeps($facts, @assumeddeps)\nSimplifies the dependency as much as possible given the list of facts (see class\nDpkg::Deps::KnownFacts) and a list of other dependencies that are known to be true.\n\n$dep->isempty()\nReturns true if the dependency is empty and doesn't contain any useful information. This is\ntrue when the object has not yet been initialized.\n\n$dep->mergeunion($otherdep)\nReturns true if $dep could be modified to represent the union of both dependencies.\nOtherwise returns false.\n",
            "subsections": []
        },
        "CHANGES": {
            "content": "Version 1.02 (dpkg 1.17.10)\nNew methods: Add $dep->profileisconcerned() and $dep->reduceprofiles().\n\nVersion 1.01 (dpkg 1.16.1)\nNew method: Add $dep->reset().\n\nNew property: recognizes the arch qualifier \"any\" and stores it in the \"archqual\" property when\npresent.\n\nVersion 1.00 (dpkg 1.15.6)\nMark the module as public.\n",
            "subsections": []
        }
    },
    "summary": "Dpkg::Deps::Simple - represents a single dependency statement",
    "flags": [],
    "examples": [],
    "see_also": []
}