{
    "content": [
        {
            "type": "text",
            "text": "# App::Cpan (perldoc)\n\n## NAME\n\nApp::Cpan - easily interact with CPAN from the command line\n\n## SYNOPSIS\n\n# with arguments and no switches, installs specified modules\ncpan modulename [ modulename ... ]\n# with switches, installs modules with extra behavior\ncpan [-cfFimtTw] modulename [ modulename ... ]\n# use local::lib\ncpan -I modulename [ modulename ... ]\n# one time mirror override for faster mirrors\ncpan -p ...\n# with just the dot, install from the distribution in the\n# current directory\ncpan .\n# without arguments, starts CPAN.pm shell\ncpan\n# without arguments, but some switches\ncpan [-ahpruvACDLOPX]\n\n## DESCRIPTION\n\nThis script provides a command interface (not a shell) to CPAN. At the moment it uses CPAN.pm to\ndo the work, but it is not a one-shot command runner for CPAN.pm.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (5 subsections)\n- **EXIT VALUES**\n- **TO DO**\n- **BUGS**\n- **SEE ALSO**\n- **SOURCE AVAILABILITY**\n- **CREDITS**\n- **AUTHOR**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "App::Cpan",
        "section": "",
        "mode": "perldoc",
        "summary": "App::Cpan - easily interact with CPAN from the command line",
        "synopsis": "# with arguments and no switches, installs specified modules\ncpan modulename [ modulename ... ]\n# with switches, installs modules with extra behavior\ncpan [-cfFimtTw] modulename [ modulename ... ]\n# use local::lib\ncpan -I modulename [ modulename ... ]\n# one time mirror override for faster mirrors\ncpan -p ...\n# with just the dot, install from the distribution in the\n# current directory\ncpan .\n# without arguments, starts CPAN.pm shell\ncpan\n# without arguments, but some switches\ncpan [-ahpruvACDLOPX]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 22,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": [
                    {
                        "name": "Options",
                        "lines": 101
                    },
                    {
                        "name": "Examples",
                        "lines": 24
                    },
                    {
                        "name": "Environment variables",
                        "lines": 32
                    },
                    {
                        "name": "Methods",
                        "lines": 1
                    },
                    {
                        "name": "run",
                        "lines": 10
                    }
                ]
            },
            {
                "name": "EXIT VALUES",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "TO DO",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SOURCE AVAILABILITY",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "CREDITS",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 4,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "App::Cpan - easily interact with CPAN from the command line\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "# with arguments and no switches, installs specified modules\ncpan modulename [ modulename ... ]\n\n# with switches, installs modules with extra behavior\ncpan [-cfFimtTw] modulename [ modulename ... ]\n\n# use local::lib\ncpan -I modulename [ modulename ... ]\n\n# one time mirror override for faster mirrors\ncpan -p ...\n\n# with just the dot, install from the distribution in the\n# current directory\ncpan .\n\n# without arguments, starts CPAN.pm shell\ncpan\n\n# without arguments, but some switches\ncpan [-ahpruvACDLOPX]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This script provides a command interface (not a shell) to CPAN. At the moment it uses CPAN.pm to\ndo the work, but it is not a one-shot command runner for CPAN.pm.\n",
                "subsections": [
                    {
                        "name": "Options",
                        "content": "-a  Creates a CPAN.pm autobundle with CPAN::Shell->autobundle.\n\n-A module [ module ... ]\nShows the primary maintainers for the specified modules.\n\n-c module\nRuns a `make clean` in the specified module's directories.\n\n-C module [ module ... ]\nShow the Changes files for the specified modules\n\n-D module [ module ... ]\nShow the module details. This prints one line for each out-of-date module (meaning, modules\nlocally installed but have newer versions on CPAN). Each line has three columns: module\nname, local version, and CPAN version.\n\n-f  Force the specified action, when it normally would have failed. Use this to install a module\neven if its tests fail. When you use this option, -i is not optional for installing a module\nwhen you need to force it:\n\n% cpan -f -i Module::Foo\n\n-F  Turn off CPAN.pm's attempts to lock anything. You should be careful with this since you\nmight end up with multiple scripts trying to muck in the same directory. This isn't so much\nof a concern if you're loading a special config with \"-j\", and that config sets up its own\nwork directories.\n\n-g module [ module ... ]\nDownloads to the current directory the latest distribution of the module.\n\n-G module [ module ... ]\nUNIMPLEMENTED\n\nDownload to the current directory the latest distribution of the modules, unpack each\ndistribution, and create a git repository for each distribution.\n\nIf you want this feature, check out Yanick Champoux's \"Git::CPAN::Patch\" distribution.\n\n-h  Print a help message and exit. When you specify \"-h\", it ignores all of the other options\nand arguments.\n\n-i module [ module ... ]\nInstall the specified modules. With no other switches, this switch is implied.\n\n-I  Load \"local::lib\" (think like \"-I\" for loading lib paths). Too bad \"-l\" was already taken.\n\n-j Config.pm\nLoad the file that has the CPAN configuration data. This should have the same format as the\nstandard CPAN/Config.pm file, which defines $CPAN::Config as an anonymous hash.\n\nIf the file does not exist, \"cpan\" dies.\n\n-J  Dump the configuration in the same format that CPAN.pm uses. This is useful for checking the\nconfiguration as well as using the dump as a starting point for a new, custom configuration.\n\n-l  List all installed modules with their versions\n\n-L author [ author ... ]\nList the modules by the specified authors.\n\n-m  Make the specified modules.\n\n-M mirror1,mirror2,...\nA comma-separated list of mirrors to use for just this run. The \"-P\" option can find them\nfor you automatically.\n\n-n  Do a dry run, but don't actually install anything. (unimplemented)\n\n-O  Show the out-of-date modules.\n\n-p  Ping the configured mirrors and print a report\n\n-P  Find the best mirrors you could be using and use them for the current session.\n\n-r  Recompiles dynamically loaded modules with CPAN::Shell->recompile.\n\n-s  Drop in the CPAN.pm shell. This command does this automatically if you don't specify any\narguments.\n\n-t module [ module ... ]\nRun a `make test` on the specified modules.\n\n-T  Do not test modules. Simply install them.\n\n-u  Upgrade all installed modules. Blindly doing this can really break things, so keep a backup.\n\n-v  Print the script version and CPAN.pm version then exit.\n\n-V  Print detailed information about the cpan client.\n\n-w  UNIMPLEMENTED\n\nTurn on cpan warnings. This checks various things, like directory permissions, and tells you\nabout problems you might have.\n\n-x module [ module ... ]\nFind close matches to the named modules that you think you might have mistyped. This\nrequires the optional installation of Text::Levenshtein or Text::Levenshtein::Damerau.\n\n-X  Dump all the namespaces to standard output.\n"
                    },
                    {
                        "name": "Examples",
                        "content": "# print a help message\ncpan -h\n\n# print the version numbers\ncpan -v\n\n# create an autobundle\ncpan -a\n\n# recompile modules\ncpan -r\n\n# upgrade all installed modules\ncpan -u\n\n# install modules ( sole -i is optional )\ncpan -i Netscape::Booksmarks Business::ISBN\n\n# force install modules ( must use -i )\ncpan -fi CGI::Minimal URI\n\n# install modules but without testing them\ncpan -Ti CGI::Minimal URI\n"
                    },
                    {
                        "name": "Environment variables",
                        "content": "There are several components in CPAN.pm that use environment variables. The build tools,\nExtUtils::MakeMaker and Module::Build use some, while others matter to the levels above them.\nSome of these are specified by the Perl Toolchain Gang:\n\nLancaster Concensus:\n<https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/lancaster-consensus.md>\n\nOslo Concensus:\n<https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/oslo-consensus.md>\n\nNONINTERACTIVETESTING\nAssume no one is paying attention and skips prompts for distributions that do that\ncorrectly. cpan(1) sets this to 1 unless it already has a value (even if that value is\nfalse).\n\nPERLMMUSEDEFAULT\nUse the default answer for a prompted questions. cpan(1) sets this to 1 unless it already\nhas a value (even if that value is false).\n\nCPANOPTS\nAs with \"PERL5OPT\", a string of additional cpan(1) options to add to those you specify on\nthe command line.\n\nCPANSCRIPTLOGLEVEL\nThe log level to use, with either the embedded, minimal logger or Log::Log4perl if it is\ninstalled. Possible values are the same as the \"Log::Log4perl\" levels: \"TRACE\", \"DEBUG\",\n\"INFO\", \"WARN\", \"ERROR\", and \"FATAL\". The default is \"INFO\".\n\nGITCOMMAND\nThe path to the \"git\" binary to use for the Git features. The default is\n\"/usr/local/bin/git\".\n"
                    },
                    {
                        "name": "Methods",
                        "content": ""
                    },
                    {
                        "name": "run",
                        "content": "Just do it.\n\nThe \"run\" method returns 0 on success and a positive number on failure. See the section on\nEXIT CODES for details on the values.\n\nCPAN.pm sends all the good stuff either to STDOUT, or to a temp file if $CPAN::BeSilent is\nset. I have to intercept that output so I can find out what happened.\n\nStolen from File::Path::Expand\n"
                    }
                ]
            },
            "EXIT VALUES": {
                "content": "The script exits with zero if it thinks that everything worked, or a positive number if it\nthinks that something failed. Note, however, that in some cases it has to divine a failure by\nthe output of things it does not control. For now, the exit codes are vague:\n\n1       An unknown error\n\n2       The was an external problem\n\n4       There was an internal problem with the script\n\n8       A module failed to install\n",
                "subsections": []
            },
            "TO DO": {
                "content": "* There is initial support for Log4perl if it is available, but I haven't gone through\neverything to make the NullLogger work out correctly if Log4perl is not installed.\n\n* When I capture CPAN.pm output, I need to check for errors and report them to the user.\n\n* Warnings switch\n\n* Check then exit\n",
                "subsections": []
            },
            "BUGS": {
                "content": "* none noted\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "CPAN, App::cpanminus\n",
                "subsections": []
            },
            "SOURCE AVAILABILITY": {
                "content": "This code is in Github in the CPAN.pm repository:\n\nhttps://github.com/andk/cpanpm\n\nThe source used to be tracked separately in another GitHub repo, but the canonical source is now\nin the above repo.\n",
                "subsections": []
            },
            "CREDITS": {
                "content": "Japheth Cleaver added the bits to allow a forced install (\"-f\").\n\nJim Brandt suggest and provided the initial implementation for the up-to-date and Changes\nfeatures.\n\nAdam Kennedy pointed out that \"exit()\" causes problems on Windows where this script ends up with\na .bat extension\n\nDavid Golden helps integrate this into the \"CPAN.pm\" repos.\n\nJim Keenan fixed up various issues with download\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "brian d foy, \"<bdfoy@cpan.org>\"\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (c) 2001-2018, brian d foy, All Rights Reserved.\n\nYou may redistribute this under the same terms as Perl itself.\n",
                "subsections": []
            }
        }
    }
}