{
    "content": [
        {
            "type": "text",
            "text": "# B::Showlex (perldoc)\n\n## NAME\n\nB::Showlex - Show lexical variables used in functions or files\n\n## SYNOPSIS\n\nperl -MO=Showlex[,-OPTIONS][,SUBROUTINE] foo.pl\n\n## DESCRIPTION\n\nWhen a comma-separated list of subroutine names is given as options, Showlex prints the lexical\nvariables used in those subroutines. Otherwise, it prints the file-scope lexicals in the file.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **EXAMPLES**\n- **SEE ALSO**\n- **TODO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "B::Showlex",
        "section": "",
        "mode": "perldoc",
        "summary": "B::Showlex - Show lexical variables used in functions or files",
        "synopsis": "perl -MO=Showlex[,-OPTIONS][,SUBROUTINE] foo.pl",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "Traditional form:",
            "$ perl -MO=Showlex -e 'my ($i,$j,$k)=(1,\"foo\")'",
            "Pad of lexical names for comppadlist has 4 entries",
            "0: (0x8caea4) undef",
            "1: (0x9db0fb0) $i",
            "2: (0x9db0f38) $j",
            "3: (0x9db0f50) $k",
            "Pad of lexical values for comppadlist has 5 entries",
            "0: SPECIAL #1 &PLsvundef",
            "1: NULL (0x9da4234)",
            "2: NULL (0x9db0f2c)",
            "3: NULL (0x9db0f44)",
            "4: NULL (0x9da4264)",
            "-e syntax OK",
            "New-style form:",
            "$ perl -MO=Showlex,-newlex -e 'my ($i,$j,$k)=(1,\"foo\")'",
            "main Pad has 4 entries",
            "0: (0x8caea4) undef",
            "1: (0xa0c4fb8) \"$i\" = NULL (0xa0b8234)",
            "2: (0xa0c4f40) \"$j\" = NULL (0xa0c4f34)",
            "3: (0xa0c4f58) \"$k\" = NULL (0xa0c4f4c)",
            "-e syntax OK",
            "New form, no specials, outside O framework:",
            "$ perl -MB::Showlex -e \\",
            "'my ($i,$j,$k)=(1,\"foo\"); B::Showlex::compile(-newlex,-nosp)->()'",
            "main Pad has 4 entries",
            "1: (0x998ffb0) \"$i\" = IV (0x9983234) 1",
            "2: (0x998ff68) \"$j\" = PV (0x998ff5c) \"foo\"",
            "3: (0x998ff80) \"$k\" = NULL (0x998ff74)",
            "Note that this example shows the values of the lexicals, whereas the other examples did not (as",
            "they're compile-time only).",
            "OPTIONS",
            "The \"-newlex\" option produces a more readable \"name => value\" format, and is shown in the second",
            "example above.",
            "The \"-nosp\" option eliminates reporting of SPECIALs, such as \"0: SPECIAL #1 &PLsvundef\" above.",
            "Reporting of SPECIALs can sometimes overwhelm your declared lexicals."
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 45,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "TODO",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "B::Showlex - Show lexical variables used in functions or files\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "perl -MO=Showlex[,-OPTIONS][,SUBROUTINE] foo.pl\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "When a comma-separated list of subroutine names is given as options, Showlex prints the lexical\nvariables used in those subroutines. Otherwise, it prints the file-scope lexicals in the file.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "Traditional form:\n\n$ perl -MO=Showlex -e 'my ($i,$j,$k)=(1,\"foo\")'\nPad of lexical names for comppadlist has 4 entries\n0: (0x8caea4) undef\n1: (0x9db0fb0) $i\n2: (0x9db0f38) $j\n3: (0x9db0f50) $k\nPad of lexical values for comppadlist has 5 entries\n0: SPECIAL #1 &PLsvundef\n1: NULL (0x9da4234)\n2: NULL (0x9db0f2c)\n3: NULL (0x9db0f44)\n4: NULL (0x9da4264)\n-e syntax OK\n\nNew-style form:\n\n$ perl -MO=Showlex,-newlex -e 'my ($i,$j,$k)=(1,\"foo\")'\nmain Pad has 4 entries\n0: (0x8caea4) undef\n1: (0xa0c4fb8) \"$i\" = NULL (0xa0b8234)\n2: (0xa0c4f40) \"$j\" = NULL (0xa0c4f34)\n3: (0xa0c4f58) \"$k\" = NULL (0xa0c4f4c)\n-e syntax OK\n\nNew form, no specials, outside O framework:\n\n$ perl -MB::Showlex -e \\\n'my ($i,$j,$k)=(1,\"foo\"); B::Showlex::compile(-newlex,-nosp)->()'\nmain Pad has 4 entries\n1: (0x998ffb0) \"$i\" = IV (0x9983234) 1\n2: (0x998ff68) \"$j\" = PV (0x998ff5c) \"foo\"\n3: (0x998ff80) \"$k\" = NULL (0x998ff74)\n\nNote that this example shows the values of the lexicals, whereas the other examples did not (as\nthey're compile-time only).\n\nOPTIONS\nThe \"-newlex\" option produces a more readable \"name => value\" format, and is shown in the second\nexample above.\n\nThe \"-nosp\" option eliminates reporting of SPECIALs, such as \"0: SPECIAL #1 &PLsvundef\" above.\nReporting of SPECIALs can sometimes overwhelm your declared lexicals.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "B::Showlex can also be used outside of the O framework, as in the third example. See B::Concise\nfor a fuller explanation of reasons.\n",
                "subsections": []
            },
            "TODO": {
                "content": "Some of the reported info, such as hex addresses, is not particularly valuable. Other\ninformation would be more useful for the typical programmer, such as line-numbers, pad-slot\nreuses, etc.. Given this, -newlex is not a particularly good flag-name.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Malcolm Beattie, \"mbeattie@sable.ox.ac.uk\"\n",
                "subsections": []
            }
        }
    }
}