{
    "content": [
        {
            "type": "text",
            "text": "# ODBM_File (man)\n\n## NAME\n\nODBMFile - Tied access to odbm files\n\n## SYNOPSIS\n\nuse Fcntl;   # For ORDWR, OCREAT, etc.\nuse ODBMFile;\n# Now read and change the hash\n$h{newkey} = newvalue;\nprint $h{oldkey};\n...\nuntie %h;\n\n## DESCRIPTION\n\n\"ODBMFile\" establishes a connection between a Perl hash variable and a file in ODBMFile\nformat;.  You can manipulate the data in the file just as if it were in a Perl hash, but when\nyour program exits, the data will remain in the file, to be used the next time your program\nruns.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **DIAGNOSTICS** (1 subsections)\n- **SECURITY AND PORTABILITY** (1 subsections)\n- **BUGS AND WARNINGS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "ODBM_File",
        "section": "",
        "mode": "man",
        "summary": "ODBMFile - Tied access to odbm files",
        "synopsis": "use Fcntl;   # For ORDWR, OCREAT, etc.\nuse ODBMFile;\n# Now read and change the hash\n$h{newkey} = newvalue;\nprint $h{oldkey};\n...\nuntie %h;",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 34,
                "subsections": []
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 3,
                "subsections": [
                    {
                        "name": "\"odbm store returned -1, errno 22, key \"...\" at ...\"",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "SECURITY AND PORTABILITY",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Do not accept ODBM files from untrusted sources.",
                        "lines": 12
                    }
                ]
            },
            {
                "name": "BUGS AND WARNINGS",
                "lines": 9,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "ODBMFile - Tied access to odbm files\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Fcntl;   # For ORDWR, OCREAT, etc.\nuse ODBMFile;\n\n# Now read and change the hash\n$h{newkey} = newvalue;\nprint $h{oldkey};\n...\n\nuntie %h;\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "\"ODBMFile\" establishes a connection between a Perl hash variable and a file in ODBMFile\nformat;.  You can manipulate the data in the file just as if it were in a Perl hash, but when\nyour program exits, the data will remain in the file, to be used the next time your program\nruns.\n\nUse \"ODBMFile\" with the Perl built-in \"tie\" function to establish the connection between the\nvariable and the file.  The arguments to \"tie\" should be:\n\n1.  The hash variable you want to tie.\n\n2.  The string \"ODBMFile\".  (Ths tells Perl to use the \"ODBMFile\" package to perform the\nfunctions of the hash.)\n\n3.  The name of the file you want to tie to the hash.\n\n4.  Flags.  Use one of:\n\n\"ORDONLY\"\nRead-only access to the data in the file.\n\n\"OWRONLY\"\nWrite-only access to the data in the file.\n\n\"ORDWR\"\nBoth read and write access.\n\nIf you want to create the file if it does not exist, add \"OCREAT\" to any of these, as in\nthe example.  If you omit \"OCREAT\" and the file does not already exist, the \"tie\" call\nwill fail.\n\n5.  The default permissions to use if a new file is created.  The actual permissions will be\nmodified by the user's umask, so you should probably use 0666 here. (See \"umask\" in\nperlfunc.)\n",
                "subsections": []
            },
            "DIAGNOSTICS": {
                "content": "On failure, the \"tie\" call returns an undefined value and probably sets $! to contain the\nreason the file could not be tied.\n",
                "subsections": [
                    {
                        "name": "\"odbm store returned -1, errno 22, key \"...\" at ...\"",
                        "content": "This warning is emitted when you try to store a key or a value that is too long.  It means\nthat the change was not recorded in the database.  See BUGS AND WARNINGS below.\n"
                    }
                ]
            },
            "SECURITY AND PORTABILITY": {
                "content": "",
                "subsections": [
                    {
                        "name": "Do not accept ODBM files from untrusted sources.",
                        "content": "On modern Linux systems these are typically GDBM files, which are not portable across\nplatforms.\n\nThe GDBM documentation doesn't imply that files from untrusted sources can be safely used\nwith \"libgdbm\".\n\nSystems that don't use GDBM compatibilty for old dbm support will be using a platform\nspecific library, possibly inherited from BSD systems, where it may or may not be safe to use\nan untrusted file.\n\nA maliciously crafted file might cause perl to crash or even expose a security vulnerability.\n"
                    }
                ]
            },
            "BUGS AND WARNINGS": {
                "content": "There are a number of limits on the size of the data that you can store in the ODBM file.\nThe most important is that the length of a key, plus the length of its associated value, may\nnot exceed 1008 bytes.\n\nSee \"tie\" in perlfunc, perldbmfilter, Fcntl\n\n\n\nperl v5.34.0                                 2025-07-25                             ODBMFile(3perl)",
                "subsections": []
            }
        }
    }
}