{
    "content": [
        {
            "type": "text",
            "text": "# Dpkg::Control::FieldsCore (perldoc)\n\n## NAME\n\nDpkg::Control::FieldsCore - manage (list of official) control fields\n\n## DESCRIPTION\n\nThe modules contains a list of fieldnames 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\n## Sections\n\n- **NAME**\n- **DESCRIPTION**\n- **FUNCTIONS** (12 subsections)\n- **CHANGES**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Dpkg::Control::FieldsCore",
        "section": "",
        "mode": "perldoc",
        "summary": "Dpkg::Control::FieldsCore - manage (list of official) control fields",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 4,
                "subsections": [
                    {
                        "name": "field_is_official",
                        "lines": 2
                    },
                    {
                        "name": "field_is_allowed_in",
                        "lines": 8
                    },
                    {
                        "name": "field_transfer_single",
                        "lines": 14
                    },
                    {
                        "name": "field_transfer_all",
                        "lines": 5
                    },
                    {
                        "name": "field_ordered_list",
                        "lines": 14
                    },
                    {
                        "name": "field_list_src_dep",
                        "lines": 2
                    },
                    {
                        "name": "field_list_pkg_dep",
                        "lines": 3
                    },
                    {
                        "name": "field_get_dep_type",
                        "lines": 5
                    },
                    {
                        "name": "field_get_sep_type",
                        "lines": 3
                    },
                    {
                        "name": "field_register",
                        "lines": 3
                    },
                    {
                        "name": "field_insert_after",
                        "lines": 2
                    },
                    {
                        "name": "field_insert_before",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "CHANGES",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Dpkg::Control::FieldsCore - manage (list of official) control fields\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The modules contains a list of fieldnames 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",
                "subsections": [
                    {
                        "name": "field_is_official",
                        "content": "Returns true if the field is official and known.\n"
                    },
                    {
                        "name": "field_is_allowed_in",
                        "content": "Returns 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"
                    },
                    {
                        "name": "field_transfer_single",
                        "content": "If 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 CTRLPKGSRC,\nCTRLPKGDEB or CTRLFILECHANGES, then they are always copied as is (the X- prefix is\nkept). Otherwise they are not copied except if the target object matches the target\ndestination encoded in the field name. The initial X denoting custom fields can be followed\nby one or more letters among \"S\" (Source: corresponds to CTRLPKGSRC), \"B\" (Binary:\ncorresponds to CTRLPKGDEB) or \"C\" (Changes: corresponds to CTRLFILECHANGES).\n\nReturns undef if nothing has been copied or the name of the new field added to $to\notherwise.\n"
                    },
                    {
                        "name": "field_transfer_all",
                        "content": "Transfer 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"
                    },
                    {
                        "name": "field_ordered_list",
                        "content": "Returns 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"
                    },
                    {
                        "name": "field_list_src_dep",
                        "content": "List of fields that contains dependencies-like information in a source Debian package.\n"
                    },
                    {
                        "name": "field_list_pkg_dep",
                        "content": "List 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"
                    },
                    {
                        "name": "field_get_dep_type",
                        "content": "Return 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"
                    },
                    {
                        "name": "field_get_sep_type",
                        "content": "Return the type of the field value separator. Can be one of FIELDSEPUNKNOWN,\nFIELDSEPSPACE, FIELDSEPCOMMA or FIELDSEPLINE.\n"
                    },
                    {
                        "name": "field_register",
                        "content": "Register a new field as being allowed in control information of specified types. %opts is\noptional\n"
                    },
                    {
                        "name": "field_insert_after",
                        "content": "Place field after another one ($ref) in output of control information of type $type.\n"
                    },
                    {
                        "name": "field_insert_before",
                        "content": "Place field before another one ($ref) in output of control information of type $type.\n"
                    }
                ]
            },
            "CHANGES": {
                "content": "Version 1.01 (dpkg 1.21.0)\nNew function: fieldparsebinarysource().\n\nVersion 1.00 (dpkg 1.17.0)\nMark the module as public.\n",
                "subsections": []
            }
        }
    }
}