{
    "content": [
        {
            "type": "text",
            "text": "# Tie::SubstrHash (perldoc)\n\n## NAME\n\nTie::SubstrHash - Fixed-table-size, fixed-key-length hashing\n\n## SYNOPSIS\n\nrequire Tie::SubstrHash;\ntie %myhash, 'Tie::SubstrHash', $keylen, $valuelen, $tablesize;\n\n## DESCRIPTION\n\nThe Tie::SubstrHash package provides a hash-table-like interface to an array of determinate\nsize, with constant key size and record size.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **CAVEATS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Tie::SubstrHash",
        "section": "",
        "mode": "perldoc",
        "summary": "Tie::SubstrHash - Fixed-table-size, fixed-key-length hashing",
        "synopsis": "require Tie::SubstrHash;\ntie %myhash, 'Tie::SubstrHash', $keylen, $valuelen, $tablesize;",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "CAVEATS",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Tie::SubstrHash - Fixed-table-size, fixed-key-length hashing\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "require Tie::SubstrHash;\n\ntie %myhash, 'Tie::SubstrHash', $keylen, $valuelen, $tablesize;\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The Tie::SubstrHash package provides a hash-table-like interface to an array of determinate\nsize, with constant key size and record size.\n\nUpon tying a new hash to this package, the developer must specify the size of the keys that will\nbe used, the size of the value fields that the keys will index, and the size of the overall\ntable (in terms of key-value pairs, not size in hard memory). *These values will not change for\nthe duration of the tied hash*. The newly-allocated hash table may now have data stored and\nretrieved. Efforts to store more than $tablesize elements will result in a fatal error, as will\nefforts to store a value not exactly $valuelen characters in length, or reference through a key\nnot exactly $keylen characters in length. While these constraints may seem excessive, the\nresult is a hash table using much less internal memory than an equivalent freely-allocated hash\ntable.\n",
                "subsections": []
            },
            "CAVEATS": {
                "content": "Because the current implementation uses the table and key sizes for the hashing algorithm, there\nis no means by which to dynamically change the value of any of the initialization parameters.\n\nThe hash does not support exists().\n",
                "subsections": []
            }
        }
    }
}