{
    "content": [
        {
            "type": "text",
            "text": "# CDDB::File (perldoc)\n\n## NAME\n\nCDDB::File - Parse a CDDB/freedb data file\n\n## SYNOPSIS\n\nmy $disc = CDDB::File->new(\"rock/f4109511\");\nprint $disc->id, $disc->allids;\nprint $disc->artist, $disc->title;\nprint $disc->year, $disc->genre, $disc->extd;\nprint $disc->length, $disc->trackcount;\nprint $disc->revision, $disc->submittedvia, $disc->processedby;\nforeach my $track ($disc->tracks) {\nprint $track->number, $track->title, $track->artist;\nprint $track->length, $track->extd;\n}\n\n## DESCRIPTION\n\nThis module provides an interface for extracting data from CDDB-format data files, as used by\nfreedb.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS**\n- **SEE ALSO**\n- **AUTHOR**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "CDDB::File",
        "section": "",
        "mode": "perldoc",
        "summary": "CDDB::File - Parse a CDDB/freedb data file",
        "synopsis": "my $disc = CDDB::File->new(\"rock/f4109511\");\nprint $disc->id, $disc->allids;\nprint $disc->artist, $disc->title;\nprint $disc->year, $disc->genre, $disc->extd;\nprint $disc->length, $disc->trackcount;\nprint $disc->revision, $disc->submittedvia, $disc->processedby;\nforeach my $track ($disc->tracks) {\nprint $track->number, $track->title, $track->artist;\nprint $track->length, $track->extd;\n}",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 53,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 10,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "CDDB::File - Parse a CDDB/freedb data file\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "my $disc = CDDB::File->new(\"rock/f4109511\");\n\nprint $disc->id, $disc->allids;\nprint $disc->artist, $disc->title;\nprint $disc->year, $disc->genre, $disc->extd;\nprint $disc->length, $disc->trackcount;\n\nprint $disc->revision, $disc->submittedvia, $disc->processedby;\n\nforeach my $track ($disc->tracks) {\nprint $track->number, $track->title, $track->artist;\nprint $track->length, $track->extd;\n}\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This module provides an interface for extracting data from CDDB-format data files, as used by\nfreedb.\n\nIt does not read data from your CD, or submit information to freedb.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "new\nmy $disc = CDDB::File->new(\"rock/f4109511\");\n\nThis will create a new object representing the data in the file name specified.\n\nid / allids\nmy $discid = $disc->id;\nmy @discid = $disc->allids;\n\nDue to how freedb works, one CD may have several IDs associated with it. 'id' will return the\nfirst of these (not necessarily related to the filename from which this was read), whilst\n'allids' will return all of them.\n\ntitle / artist\nThe title and artist of this CD. For eponymous CDs these will be identical, even if the data\nfile leaves the artist field blank.\n\nyear\nThe (4-digit) year of release.\n\ngenre\nThe genre of this CD. This is the genre as stored in the data file itself, which is not related\nto the 11 main freedb genres.\n\nextd\nThe \"extended data\" for the CD. This is used for storing miscellaneous information which has no\nbetter storage place, and can be of any length.\n\nlength\nThe run time of the CD in seconds.\n\ntrackcount\nThe number of tracks on the CD.\n\nrevision\nEach time information regarding the CD is updated this revision number is incremented. This\nreturns the revision number of this version.\n\nprocessedby / submittedvia\nThe software which submitted this information to freedb and which processed it at the other end.\n\ntracks\nforeach my $track ($disc->tracks) {\nprint $track->number, $track->title, $track->artist;\nprint $track->length, $track->extd;\n}\n\nReturns a list of Track objects, each of which knows its number (numering from 1), title, length\n(in seconds), offset, and may also have extended track data.\n\nTracks may also contain an 'artist' field. If this is not set the artist method will return the\nartist of the CD.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "http://www.freedb.org/\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Tony Bowden\n\nBUGS and QUERIES\nPlease direct all correspondence regarding this module to: bug-CDDB-File@rt.cpan.org\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (C) 2001-2005 Tony Bowden. All rights reserved.\n\nThis program is free software; you can redistribute it and/or modify it under\nthe terms of the GNU General Public License; either version 2 of the License,\nor (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\nFOR A PARTICULAR PURPOSE.\n",
                "subsections": []
            }
        }
    }
}