{
    "content": [
        {
            "type": "text",
            "text": "# lib::core::only (perldoc)\n\n## NAME\n\nlib::core::only - Remove all non-core paths from @INC to avoid site/vendor dirs\n\n## SYNOPSIS\n\nuse lib::core::only; # now @INC contains only the two core directories\nTo get only the core directories plus the ones for the local::lib in scope:\n$ perl -mlocal::lib -Mlib::core::only -Mlocal::lib=~/perl5 myscript.pl\nTo attempt to do a self-contained build (but note this will not reliably propagate into\nsubprocesses, see the CAVEATS below):\n$ PERL5OPT='-mlocal::lib -Mlib::core::only -Mlocal::lib=~/perl5' cpan\nPlease note that it is necessary to use \"local::lib\" twice for this to work. First so that\n\"lib::core::only\" doesn't prevent \"local::lib\" from loading (it's not currently in core) and\nthen again after \"lib::core::only\" so that the local paths are not removed.\n\n## DESCRIPTION\n\nlib::core::only is simply a shortcut to say \"please reduce my @INC to only the core lib and\narchlib (architecture-specific lib) directories of this perl\".\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **CAVEATS**\n- **AUTHOR**\n- **LICENSE**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "lib::core::only",
        "section": "",
        "mode": "perldoc",
        "summary": "lib::core::only - Remove all non-core paths from @INC to avoid site/vendor dirs",
        "synopsis": "use lib::core::only; # now @INC contains only the two core directories\nTo get only the core directories plus the ones for the local::lib in scope:\n$ perl -mlocal::lib -Mlib::core::only -Mlocal::lib=~/perl5 myscript.pl\nTo attempt to do a self-contained build (but note this will not reliably propagate into\nsubprocesses, see the CAVEATS below):\n$ PERL5OPT='-mlocal::lib -Mlib::core::only -Mlocal::lib=~/perl5' cpan\nPlease note that it is necessary to use \"local::lib\" twice for this to work. First so that\n\"lib::core::only\" doesn't prevent \"local::lib\" from loading (it's not currently in core) and\nthen again after \"lib::core::only\" so that the local paths are not removed.",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "CAVEATS",
                "lines": 32,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "lib::core::only - Remove all non-core paths from @INC to avoid site/vendor dirs\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use lib::core::only; # now @INC contains only the two core directories\n\nTo get only the core directories plus the ones for the local::lib in scope:\n\n$ perl -mlocal::lib -Mlib::core::only -Mlocal::lib=~/perl5 myscript.pl\n\nTo attempt to do a self-contained build (but note this will not reliably propagate into\nsubprocesses, see the CAVEATS below):\n\n$ PERL5OPT='-mlocal::lib -Mlib::core::only -Mlocal::lib=~/perl5' cpan\n\nPlease note that it is necessary to use \"local::lib\" twice for this to work. First so that\n\"lib::core::only\" doesn't prevent \"local::lib\" from loading (it's not currently in core) and\nthen again after \"lib::core::only\" so that the local paths are not removed.\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "lib::core::only is simply a shortcut to say \"please reduce my @INC to only the core lib and\narchlib (architecture-specific lib) directories of this perl\".\n\nYou might want to do this to ensure a local::lib contains only the code you need, or to test an\nApp::FatPacker tree, or to avoid known bad vendor packages.\n\nYou might want to use this to try and install a self-contained tree of perl modules. Be warned\nthat that probably won't work (see \"CAVEATS\").\n\nThis module was extracted from local::lib's --self-contained feature, and contains the only part\nthat ever worked. I apologise to anybody who thought anything else did.\n",
                "subsections": []
            },
            "CAVEATS": {
                "content": "This does not propagate properly across perl invocations like local::lib's stuff does. It can't.\nIt's only a module import, so it only affects the specific perl VM instance in which you load\nand import() it.\n\nIf you want to cascade it across invocations, you can set the PERL5OPT environment variable to\n'-Mlib::core::only' and it'll sort of work. But be aware that taint mode ignores this, so some\nmodules' build and test code probably will as well.\n\nYou also need to be aware that perl's command line options are not processed in order - -I\noptions take effect before -M options, so\n\nperl -Mlib::core::only -Ilib\n\nis unlike to do what you want - it's exactly equivalent to:\n\nperl -Mlib::core::only\n\nIf you want to combine a core-only @INC with additional paths, you need to add the additional\npaths using -M options and the lib module:\n\nperl -Mlib::core::only -Mlib=lib\n\n# or if you're trying to test compiled code:\n\nperl -Mlib::core::only -Mblib\n\nFor more information on the impossibility of sanely propagating this across module builds\nwithout help from the build program, see\n<http://www.shadowcat.co.uk/blog/matt-s-trout/tainted-love> - and for ways to achieve the old\n--self-contained feature's results, look at App::FatPacker's tree function, and at\nApp::cpanminus's --local-lib-contained feature.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Matt S. Trout <mst@shadowcat.co.uk>\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "This library is free software under the same terms as perl itself.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "(c) 2010 the lib::core::only \"AUTHOR\" as specified above.\n",
                "subsections": []
            }
        }
    }
}