{
    "content": [
        {
            "type": "text",
            "text": "# Dpkg::Changelog (perldoc)\n\n## NAME\n\nDpkg::Changelog - base class to implement a changelog parser\n\n## DESCRIPTION\n\nDpkg::Changelog is a class representing a changelog file as an array of changelog entries\n(Dpkg::Changelog::Entry). By deriving this class and implementing its parse method, you add the\nability to fill this object with changelog entries.\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION**\n- **METHODS**\n- **RANGE SELECTION**\n- **CHANGES**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Dpkg::Changelog",
        "section": "",
        "mode": "perldoc",
        "summary": "Dpkg::Changelog - base class to implement a changelog parser",
        "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": "METHODS",
                "lines": 120,
                "subsections": []
            },
            {
                "name": "RANGE SELECTION",
                "lines": 50,
                "subsections": []
            },
            {
                "name": "CHANGES",
                "lines": 13,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Dpkg::Changelog - base class to implement a changelog parser\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Dpkg::Changelog is a class representing a changelog file as an array of changelog entries\n(Dpkg::Changelog::Entry). By deriving this class and implementing its parse method, you add the\nability to fill this object with changelog entries.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "$c = Dpkg::Changelog->new(%options)\nCreates a new changelog object.\n\n$c->setoptions(%opts)\nChange the value of some options. \"verbose\" (defaults to 1) defines whether parse errors are\ndisplayed as warnings by default. \"reportfile\" is a string to use instead of the name of the\nfile parsed, in particular in error messages. \"range\" defines the range of entries that we\nwant to parse, the parser will stop as soon as it has parsed enough data to satisfy\n$c->getrange($opts{range}).\n\n$count = $c->parse($fh, $description)\nRead the filehandle and parse a changelog in it. The data in the object is reset before\nparsing new data.\n\nReturns the number of changelog entries that have been parsed with success.\n\nThis method needs to be implemented by one of the specialized changelog format subclasses.\n\n$count = $c->load($filename)\nParse $filename contents for a changelog.\n\nReturns the number of changelog entries that have been parsed with success.\n\n$c->resetparseerrors()\nCan be used to delete all information about errors occurred during previous parse runs.\n\n$c->parseerror($file, $linenr, $error, [$line])\nRecord a new parse error in $file at line $linenr. The error message is specified with\n$error and a copy of the line can be recorded in $line.\n\n$c->getparseerrors()\nReturns all error messages from the last parse run. If called in scalar context returns a\nhuman readable string representation. If called in list context returns an array of arrays.\nEach of these arrays contains\n\n1.  a string describing the origin of the data (a filename usually). If the reportfile\nconfiguration option was given, its value will be used instead.\n\n2.  the line number where the error occurred\n\n3.  an error description\n\n4.  the original line\n\n$c->setunparsedtail($tail)\nAdd a string representing unparsed lines after the changelog entries. Use undef as $tail to\nremove the unparsed lines currently set.\n\n$c->getunparsedtail()\nReturn a string representing the unparsed lines after the changelog entries. Returns undef\nif there's no such thing.\n\n@{$c}\nReturns all the Dpkg::Changelog::Entry objects contained in this changelog in the order in\nwhich they have been parsed.\n\n$c->getrange($range)\nReturns an array (if called in list context) or a reference to an array of\nDpkg::Changelog::Entry objects which each represent one entry of the changelog. $range is a\nhash reference describing the range of entries to return. See section \"RANGE SELECTION\".\n\n$c->abortearly()\nReturns true if enough data have been parsed to be able to return all entries selected by\nthe range set at creation (or with setoptions).\n\n$str = $c->output()\n\"$c\"\nReturns a string representation of the changelog (it's a concatenation of the string\nrepresentation of the individual changelog entries).\n\n$c->output($fh)\nOutput the changelog to the given filehandle.\n\n$c->save($filename)\nSave the changelog in the given file.\n\n$control = $c->formatrange($format, $range)\nFormats the changelog into Dpkg::Control::Changelog objects representing the entries\nselected by the optional range specifier (see \"RANGE SELECTION\" for details). In scalar\ncontext returns a Dpkg::Index object containing the selected entries, in list context\nreturns an array of Dpkg::Control::Changelog objects.\n\nWith format dpkg the returned Dpkg::Control::Changelog object is coalesced from the entries\nin the changelog that are part of the range requested, with the fields described below, but\nconsidering that \"selected entry\" means the first entry of the selected range.\n\nWith format rfc822 each returned Dpkg::Control::Changelog objects represents one entry in\nthe changelog that is part of the range requested, with the fields described below, but\nconsidering that \"selected entry\" means for each entry.\n\nThe different formats return undef if no entries are matched. The following fields are\ncontained in the object(s) returned:\n\nSource\npackage name (selected entry)\n\nVersion\npackages' version (selected entry)\n\nDistribution\ntarget distribution (selected entry)\n\nUrgency\nurgency (highest of all entries in range)\n\nMaintainer\nperson that created the (selected) entry\n\nDate\ndate of the (selected) entry\n\nTimestamp\ndate of the (selected) entry as a timestamp in seconds since the epoch\n\nCloses\nbugs closed by the (selected) entry/entries, sorted by bug number\n\nChanges\ncontent of the (selected) entry/entries\n",
                "subsections": []
            },
            "RANGE SELECTION": {
                "content": "A range selection is described by a hash reference where the allowed keys and values are\ndescribed below.\n\nThe following options take a version number as value.\n\nsince\nCauses changelog information from all versions strictly later than version to be used.\n\nuntil\nCauses changelog information from all versions strictly earlier than version to be used.\n\nfrom\nSimilar to \"since\" but also includes the information for the specified version itself.\n\nto  Similar to \"until\" but also includes the information for the specified version itself.\n\nThe following options don't take version numbers as values:\n\nall If set to a true value, all entries of the changelog are returned, this overrides all other\noptions.\n\ncount\nExpects a signed integer as value. Returns \"value\" entries from the top of the changelog if\nset to a positive integer, and \"abs(value)\" entries from the tail if set to a negative\ninteger.\n\noffset\nExpects a signed integer as value. Changes the starting point for \"count\", either counted\nfrom the top (positive integer) or from the tail (negative integer). \"offset\" has no effect\nif \"count\" wasn't given as well.\n\nSome examples for the above options. Imagine an example changelog with entries for the versions\n1.2, 1.3, 2.0, 2.1, 2.2, 3.0 and 3.1.\n\nRange                        Included entries\n-----                        ----------------\nsince => '2.0'               3.1, 3.0, 2.2\nuntil => '2.0'               1.3, 1.2\nfrom  => '2.0'               3.1, 3.0, 2.2, 2.1, 2.0\nto    => '2.0'               2.0, 1.3, 1.2\ncount =>  2                  3.1, 3.0\ncount => -2                  1.3, 1.2\ncount =>  3, offset => 2     2.2, 2.1, 2.0\ncount =>  2, offset => -3    2.0, 1.3\ncount => -2, offset => 3     3.0, 2.2\ncount => -2, offset => -3    2.2, 2.1\n\nAny combination of one option of \"since\" and \"from\" and one of \"until\" and \"to\" returns the\nintersection of the two results with only one of the options specified.\n",
                "subsections": []
            },
            "CHANGES": {
                "content": "Version 2.00 (dpkg 1.20.0)\nRemove methods: $c->dpkg(), $c->rfc822().\n\nVersion 1.01 (dpkg 1.18.8)\nNew method: $c->formatrange().\n\nDeprecated methods: $c->dpkg(), $c->rfc822().\n\nNew field Timestamp in output formats.\n\nVersion 1.00 (dpkg 1.15.6)\nMark the module as public.\n",
                "subsections": []
            }
        }
    }
}