{
    "mode": "info",
    "parameter": "Dpkg::BuildFlags",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/Dpkg%3A%3ABuildFlags/json",
    "generated": "2026-07-07T16:48:59Z",
    "sections": {
        "NAME": {
            "content": "Dpkg::BuildFlags - query build flags\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This class is used by dpkg-buildflags and can be used to query the same\ninformation.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "$bf = Dpkg::BuildFlags->new()\nCreate a new Dpkg::BuildFlags object. It will be initialized based\non the value of several configuration files and environment\nvariables.\n\n$bf->loadvendordefaults()\nReset the flags stored to the default set provided by the vendor.\n\n$bf->loadsystemconfig()\nUpdate flags from the system configuration.\n\n$bf->loaduserconfig()\nUpdate flags from the user configuration.\n\n$bf->loadenvironmentconfig()\nUpdate flags based on user directives stored in the environment.\nSee dpkg-buildflags(1) for details.\n\n$bf->loadmaintainerconfig()\nUpdate flags based on maintainer directives stored in the\nenvironment. See dpkg-buildflags(1) for details.\n\n$bf->loadconfig()\nCall successively loadsystemconfig(), loaduserconfig(),\nloadenvironmentconfig() and loadmaintainerconfig() to update\nthe default build flags defined by the vendor.\n\n$bf->unset($flag)\nUnset the build flag $flag, so that it will not be known anymore.\n\n$bf->set($flag, $value, $source, $maint)\nUpdate the build flag $flag with value $value and record its origin\nas $source (if defined). Record it as maintainer modified if $maint\nis defined and true.\n\n$bf->setfeature($area, $feature, $enabled)\nUpdate the boolean state of whether a specific feature within a\nknown feature area has been enabled. The only currently known\nfeature areas are \"future\", \"qa\", \"sanitize\", \"hardening\" and\n\"reproducible\".\n\n$bf->strip($flag, $value, $source, $maint)\nUpdate the build flag $flag by stripping the flags listed in $value\nand record its origin as $source (if defined). Record it as\nmaintainer modified if $maint is defined and true.\n\n$bf->append($flag, $value, $source, $maint)\nAppend the options listed in $value to the current value of the\nflag $flag.  Record its origin as $source (if defined). Record it\nas maintainer modified if $maint is defined and true.\n\n$bf->prepend($flag, $value, $source, $maint)\nPrepend the options listed in $value to the current value of the\nflag $flag.  Record its origin as $source (if defined). Record it\nas maintainer modified if $maint is defined and true.\n\n$bf->updatefromconffile($file, $source)\nUpdate the current build flags based on the configuration\ndirectives contained in $file. See dpkg-buildflags(1) for the\nformat of the directives.\n\n$source is the origin recorded for any build flag set or modified.\n\n$bf->get($flag)\nReturn the value associated to the flag. It might be undef if the\nflag doesn't exist.\n\n$bf->getfeatureareas()\nReturn the feature areas (i.e. the area values hasfeatures will\nreturn true for).\n\n$bf->getfeatures($area)\nReturn, for the given area, a hash with keys as feature names, and\nvalues as booleans indicating whether the feature is enabled or\nnot.\n\n$bf->getorigin($flag)\nReturn the origin associated to the flag. It might be undef if the\nflag doesn't exist.\n\n$bf->ismaintainermodified($flag)\nReturn true if the flag is modified by the maintainer.\n\n$bf->hasfeatures($area)\nReturns true if the given area of features is known, and false\notherwise.  The only currently recognized feature areas are\n\"future\", \"qa\", \"sanitize\", \"hardening\" and \"reproducible\".\n\n$bf->has($option)\nReturns a boolean indicating whether the flags exists in the\nobject.\n\n@flags = $bf->list()\nReturns the list of flags stored in the object.\n",
            "subsections": []
        },
        "CHANGES": {
            "content": "Version 1.04 (dpkg 1.20.0)\nNew method: $bf->unset().\n\nVersion 1.03 (dpkg 1.16.5)\nNew method: $bf->getfeatureareas() to list possible values for\n$bf->getfeatures.\n\nNew method $bf->ismaintainermodified() and new optional parameter to\n$bf->set(), $bf->append(), $bf->prepend(), $bf->strip().\n\nVersion 1.02 (dpkg 1.16.2)\nNew methods: $bf->getfeatures(), $bf->hasfeatures(),\n$bf->setfeature().\n\nVersion 1.01 (dpkg 1.16.1)\nNew method: $bf->prepend() very similar to append(). Implement support\nof the prepend operation everywhere.\n\nNew method: $bf->loadmaintainerconfig() that update the build flags\nbased on the package maintainer directives.\n\nVersion 1.00 (dpkg 1.15.7)\nMark the module as public.\n\n1.21.1                            2025-09-09           Dpkg::BuildFlags(3perl)",
            "subsections": []
        }
    },
    "summary": "Dpkg::BuildFlags - query build flags",
    "flags": [],
    "examples": [],
    "see_also": []
}