{
    "content": [
        {
            "type": "text",
            "text": "# experimental (man)\n\n## NAME\n\nexperimental - Experimental features made easy\n\n## SYNOPSIS\n\nuse experimental 'lexicalsubs', 'smartmatch';\nmy sub foo { $[0] ~~ 1 }\n\n## DESCRIPTION\n\nThis pragma provides an easy and convenient way to enable or disable experimental features.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION** (2 subsections)\n- **SEE ALSO**\n- **AUTHOR**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "experimental",
        "section": "",
        "mode": "man",
        "summary": "experimental - Experimental features made easy",
        "synopsis": "use experimental 'lexicalsubs', 'smartmatch';\nmy sub foo { $[0] ~~ 1 }",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 91,
                "subsections": [
                    {
                        "name": "Ordering matters",
                        "lines": 17
                    },
                    {
                        "name": "Disclaimer",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 8,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "experimental - Experimental features made easy\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version 0.024\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use experimental 'lexicalsubs', 'smartmatch';\nmy sub foo { $[0] ~~ 1 }\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This pragma provides an easy and convenient way to enable or disable experimental features.\n\nEvery version of perl has some number of features present but considered \"experimental.\"  For\nmuch of the life of Perl 5, this was only a designation found in the documentation.  Starting\nin Perl v5.10.0, and more aggressively in v5.18.0, experimental features were placed behind\npragmata used to enable the feature and disable associated warnings.\n\nThe \"experimental\" pragma exists to combine the required incantations into a single interface\nstable across releases of perl.  For every experimental feature, this should enable the\nfeature and silence warnings for the enclosing lexical scope:\n\nuse experimental 'feature-name';\n\nTo disable the feature and, if applicable, re-enable any warnings, use:\n\nno experimental 'feature-name';\n\nThe supported features, documented further below, are:\n\n•   \"arraybase\" - allow the use of $[ to change the starting index of @array.\n\nThis is supported on all versions of perl.\n\n•   \"autoderef\" - allow push, each, keys, and other built-ins on references.\n\nThis was added in perl 5.14.0 and removed in perl 5.23.1.\n\n•   \"bitwise\" - allow the new stringwise bit operators\n\nThis was added in perl 5.22.0.\n\n•   \"constattr\" - allow the :const attribute on subs\n\nThis was added in perl 5.22.0.\n\n•   \"declaredrefs\" - enables aliasing via assignment to references\n\nThis was added in perl 5.26.0.\n\n•   \"isa\" - allow the use of the \"isa\" infix operator\n\nThis was added in perl 5.32.0.\n\n•   \"lexicaltopic\" - allow the use of lexical $ via \"my $\".\n\nThis was added in perl 5.10.0 and removed in perl 5.23.4.\n\n•   \"lexicalsubs\" - allow the use of lexical subroutines.\n\nThis was added in 5.18.0.\n\n•   \"postderef\" - allow the use of postfix dereferencing expressions\n\nThis was added in perl 5.20.0, and became non-experimental (and always enabled) in\n5.24.0.\n\n•   \"postderefqq\" - allow the use of postfix dereferencing expressions inside interpolating\nstrings\n\nThis was added in perl 5.20.0, and became non-experimental (and always enabled) in\n5.24.0.\n\n•   \"restrict\" - enables strict mode in regular expressions\n\nThis was added in perl 5.22.0.\n\n•   \"refaliasing\" - allow aliasing via \"\\$x = \\$y\"\n\nThis was added in perl 5.22.0.\n\n•   \"regexsets\" - allow extended bracketed character classes in regexps\n\nThis was added in perl 5.18.0.\n\n•   \"signatures\" - allow subroutine signatures (for named arguments)\n\nThis was added in perl 5.20.0.\n\n•   \"smartmatch\" - allow the use of \"~~\"\n\nThis was added in perl 5.10.0, but it should be noted there are significant\nincompatibilities between 5.10.0 and 5.10.1.\n\n•   \"switch\" - allow the use of \"~~\", given, and when\n\nThis was added in perl 5.10.0.\n\n•   \"win32perlio\" - allows the use of the :win32 IO layer.\n\nThis was added on perl 5.22.0.\n",
                "subsections": [
                    {
                        "name": "Ordering matters",
                        "content": "Using this pragma to 'enable an experimental feature' is another way of saying that this\npragma will disable the warnings which would result from using that feature.  Therefore, the\norder in which pragmas are applied is important.  In particular, you probably want to enable\nexperimental features after you enable warnings:\n\nuse warnings;\nuse experimental 'smartmatch';\n\nYou also need to take care with modules that enable warnings for you.  A common example being\nMoose.  In this example, warnings for the 'smartmatch' feature are first turned on by the\nwarnings pragma, off by the experimental pragma and back on again by the Moose module (fix is\nto switch the last two lines):\n\nuse warnings;\nuse experimental 'smartmatch';\nuse Moose;\n"
                    },
                    {
                        "name": "Disclaimer",
                        "content": "Because of the nature of the features it enables, forward compatibility can not be guaranteed\nin any way.\n"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "perlexperiment contains more information about experimental features.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Leon Timmermans <leont@cpan.org>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "This software is copyright (c) 2013 by Leon Timmermans.\n\nThis is free software; you can redistribute it and/or modify it under the same terms as the\nPerl 5 programming language system itself.\n\n\n\nperl v5.34.0                                 2025-07-25                          experimental(3perl)",
                "subsections": []
            }
        }
    }
}