{
    "mode": "perldoc",
    "parameter": "Dpkg::Control::FieldsCore",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Dpkg%3A%3AControl%3A%3AFieldsCore/json",
    "generated": "2026-10-05T18:49:11Z",
    "sections": {
        "NAME": {
            "content": "Dpkg::Control::FieldsCore - manage (list of official) control fields\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The modules contains a list of field names with associated meta-data explaining in which type of\ncontrol information they are allowed. The types are the CTRL* constants exported by\nDpkg::Control.\n",
            "subsections": []
        },
        "FUNCTIONS": {
            "content": "$f = fieldcapitalize($fieldname)\nReturns the field name properly capitalized. All characters are lowercase, except the first\nof each word (words are separated by a hyphen in field names).\n\n$bool = fieldisofficial($fname)\nReturns true if the field is official and known.\n\n$bool = fieldisallowedin($fname, @types)\nReturns true (1) if the field $fname is allowed in all the types listed in the list. Note\nthat you can use type sets instead of individual types (ex: CTRLFILECHANGES |\nCTRLCHANGELOG).\n\nfieldallowedin(A|B, C) returns true only if the field is allowed in C and either A or B.\n\nUndef is returned for non-official fields.\n\n$newfield = fieldtransfersingle($from, $to, $field)\nIf appropriate, copy the value of the field named $field taken from the $from Dpkg::Control\nobject to the $to Dpkg::Control object.\n\nOfficial fields are copied only if the field is allowed in both types of objects. Custom\nfields are treated in a specific manner. When the target is not among CTRLDSC, CTRLDEB or\nCTRLFILECHANGES, then they are always copied as is (the X- prefix is kept). Otherwise they\nare not copied except if the target object matches the target destination encoded in the\nfield name. The initial X denoting custom fields can be followed by one or more letters\namong \"S\" (Source: corresponds to CTRLDSC), \"B\" (Binary: corresponds to CTRLDEB) or \"C\"\n(Changes: corresponds to CTRLFILECHANGES).\n\nReturns undef if nothing has been copied or the name of the new field added to $to\notherwise.\n\n@fieldlist = fieldtransferall($from, $to)\nTransfer all appropriate fields from $from to $to. Calls fieldtransfersingle() on all\nfields available in $from.\n\nReturns the list of fields that have been added to $to.\n\n@fieldlist = fieldorderedlist($type)\nReturns an ordered list of fields for a given type of control information. This list can be\nused to output the fields in a predictable order. The list might be empty for types where\nthe order does not matter much.\n\n($source, $version) = fieldparsebinarysource($ctrl)\nParse the Source field in a binary package control stanza. The field contains the source\npackage name where it was built from, and optionally a space and the source version enclosed\nin parenthesis if it is different from the binary version.\n\nReturns a list with the $source name, and the source $version, or undef or an empty list\nwhen $ctrl does not contain a binary package control stanza. Neither $source nor $version\nare validated, but that can be done with Dpkg::Package::pkgnameisillegal() and\nDpkg::Version::versioncheck().\n\n@fieldlist = fieldlistsrcdep()\nList of fields that contains dependencies-like information in a source Debian package.\n\n@fieldlist = fieldlistpkgdep()\nList of fields that contains dependencies-like information in a binary Debian package. The\nfields that express real dependencies are sorted from the stronger to the weaker.\n\n$deptype = fieldgetdeptype($field)\nReturn the type of the dependency expressed by the given field. Can either be \"normal\" for a\nreal dependency field (Pre-Depends, Depends, ...) or \"union\" for other relation fields\nsharing the same syntax (Conflicts, Breaks, ...). Returns undef for fields which are not\ndependencies.\n\n$septype = fieldgetseptype($field)\nReturn the type of the field value separator. Can be one of FIELDSEPUNKNOWN,\nFIELDSEPSPACE, FIELDSEPCOMMA or FIELDSEPLINE.\n",
            "subsections": [
                {
                    "name": "field_register",
                    "content": "Register a new field as being allowed in control information of specified types. %opts is\noptional.\n\n$bool = fieldinsertafter($type, $ref, @fields)\nPlace field after another one ($ref) in output of control information of type $type.\n\nReturn true if the field was inserted, otherwise false.\n\n$bool = fieldinsertbefore($type, $ref, @fields)\nPlace field before another one ($ref) in output of control information of type $type.\n\nReturn true if the field was inserted, otherwise false.\n"
                }
            ]
        },
        "CHANGES": {
            "content": "Version 1.02 (dpkg 1.22.0)\nDeprecate argument: fieldtransfersingle() implicit argument usage.\n\nVersion 1.01 (dpkg 1.21.0)\nNew function: fieldparsebinarysource().\n\nVersion 1.00 (dpkg 1.17.0)\nMark the module as public.\n",
            "subsections": []
        }
    },
    "summary": "Dpkg::Control::FieldsCore - manage (list of official) control fields",
    "flags": [],
    "examples": [],
    "see_also": []
}