{
    "content": [
        {
            "type": "text",
            "text": "# Tie::Handle (perldoc)\n\n**Summary:** Tie::Handle - base class definitions for tied handles\n\n**Synopsis:** package NewHandle;\nrequire Tie::Handle;\n@ISA = qw(Tie::Handle);\nsub READ { ... }            # Provide a needed method\nsub TIEHANDLE { ... }       # Overrides inherited method\npackage main;\ntie *FH, 'NewHandle';\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (13 lines)\n- **DESCRIPTION** (59 lines)\n- **MORE INFORMATION** (2 lines)\n- **COMPATIBILITY** (7 lines)\n\n## Full Content\n\n### NAME\n\nTie::Handle - base class definitions for tied handles\n\n### SYNOPSIS\n\npackage NewHandle;\nrequire Tie::Handle;\n\n@ISA = qw(Tie::Handle);\n\nsub READ { ... }            # Provide a needed method\nsub TIEHANDLE { ... }       # Overrides inherited method\n\n\npackage main;\n\ntie *FH, 'NewHandle';\n\n### DESCRIPTION\n\nThis module provides some skeletal methods for handle-tying classes. See\nperltie for a list of the functions required in tying a handle to a\npackage. The basic Tie::Handle package provides a \"new\" method, as well\nas methods \"TIEHANDLE\", \"PRINT\", \"PRINTF\" and \"GETC\".\n\nFor developers wishing to write their own tied-handle classes, the\nmethods are summarized below. The perltie section not only documents\nthese, but has sample code as well:\n\nTIEHANDLE classname, LIST\nThe method invoked by the command \"tie *glob, classname\". Associates\na new glob instance with the specified class. \"LIST\" would represent\nadditional arguments (along the lines of AnyDBMFile and\ncompatriots) needed to complete the association.\n\nWRITE this, scalar, length, offset\nWrite *length* bytes of data from *scalar* starting at *offset*.\n\nPRINT this, LIST\nPrint the values in *LIST*\n\nPRINTF this, format, LIST\nPrint the values in *LIST* using *format*\n\nREAD this, scalar, length, offset\nRead *length* bytes of data into *scalar* starting at *offset*.\n\nREADLINE this\nRead a single line\n\nGETC this\nGet a single character\n\nCLOSE this\nClose the handle\n\nOPEN this, filename\n(Re-)open the handle\n\nBINMODE this\nSpecify content is binary\n\nEOF this\nTest for end of file.\n\nTELL this\nReturn position in the file.\n\nSEEK this, offset, whence\nPosition the file.\n\nTest for end of file.\n\nDESTROY this\nFree the storage associated with the tied handle referenced by\n*this*. This is rarely needed, as Perl manages its memory quite\nwell. But the option exists, should a class wish to perform specific\nactions upon the destruction of an instance.\n\n### MORE INFORMATION\n\nThe perltie section contains an example of tying handles.\n\n### COMPATIBILITY\n\nThis version of Tie::Handle is neither related to nor compatible with\nthe Tie::Handle (3.0) module available on CPAN. It was due to an\naccident that two modules with the same name appeared. The namespace\nclash has been cleared in favor of this module that comes with the perl\ncore in September 2000 and accordingly the version number has been\nbumped up to 4.0.\n\n"
        }
    ],
    "structuredContent": {
        "command": "Tie::Handle",
        "section": "",
        "mode": "perldoc",
        "summary": "Tie::Handle - base class definitions for tied handles",
        "synopsis": "package NewHandle;\nrequire Tie::Handle;\n@ISA = qw(Tie::Handle);\nsub READ { ... }            # Provide a needed method\nsub TIEHANDLE { ... }       # Overrides inherited method\npackage main;\ntie *FH, 'NewHandle';",
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 59,
                "subsections": []
            },
            {
                "name": "MORE INFORMATION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COMPATIBILITY",
                "lines": 7,
                "subsections": []
            }
        ]
    }
}