andk / cpanpm Goto Github PK
View Code? Open in Web Editor NEWCPAN.pm
CPAN.pm
NAME CPAN - query, download and build perl modules from CPAN sites SYNOPSIS Interactive mode: perl -MCPAN -e shell --or-- cpan Basic commands: # Modules: cpan> install Acme::Meta # in the shell CPAN::Shell->install("Acme::Meta"); # in perl # Distributions: cpan> install NWCLARK/Acme-Meta-0.02.tar.gz # in the shell CPAN::Shell-> install("NWCLARK/Acme-Meta-0.02.tar.gz"); # in perl # module objects: $mo = CPAN::Shell->expandany($mod); $mo = CPAN::Shell->expand("Module",$mod); # same thing # distribution objects: $do = CPAN::Shell->expand("Module",$mod)->distribution; $do = CPAN::Shell->expandany($distro); # same thing $do = CPAN::Shell->expand("Distribution", $distro); # same thing DESCRIPTION The CPAN module automates or at least simplifies the make and install of perl modules and extensions. It includes some primitive searching capabilities and knows how to use LWP, HTTP::Tiny, Net::FTP and certain external download clients to fetch distributions from the net. These are fetched from one or more mirrored CPAN (Comprehensive Perl Archive Network) sites and unpacked in a dedicated directory. The CPAN module also supports named and versioned *bundles* of modules. Bundles simplify handling of sets of related modules. See Bundles below. The package contains a session manager and a cache manager. The session manager keeps track of what has been fetched, built, and installed in the current session. The cache manager keeps track of the disk space occupied by the make processes and deletes excess space using a simple FIFO mechanism. All methods provided are accessible in a programmer style and in an interactive shell style. CPAN::shell([$prompt, $command]) Starting Interactive Mode Enter interactive mode by running perl -MCPAN -e shell or cpan which puts you into a readline interface. If "Term::ReadKey" and either of "Term::ReadLine::Perl" or "Term::ReadLine::Gnu" are installed, history and command completion are supported. Once at the command line, type "h" for one-page help screen; the rest should be self-explanatory. The function call "shell" takes two optional arguments: one the prompt, the second the default initial command line (the latter only works if a real ReadLine interface module is installed). The most common uses of the interactive modes are Searching for authors, bundles, distribution files and modules There are corresponding one-letter commands "a", "b", "d", and "m" for each of the four categories and another, "i" for any of the mentioned four. Each of the four entities is implemented as a class with slightly differing methods for displaying an object. Arguments to these commands are either strings exactly matching the identification string of an object, or regular expressions matched case-insensitively against various attributes of the objects. The parser only recognizes a regular expression when you enclose it with slashes. The principle is that the number of objects found influences how an item is displayed. If the search finds one item, the result is displayed with the rather verbose method "as_string", but if more than one is found, each object is displayed with the terse method "as_glimpse". Examples: cpan> m Acme::MetaSyntactic Module id = Acme::MetaSyntactic CPAN_USERID BOOK (Philippe Bruhat (BooK) <[...]>) CPAN_VERSION 0.99 CPAN_FILE B/BO/BOOK/Acme-MetaSyntactic-0.99.tar.gz UPLOAD_DATE 2006-11-06 MANPAGE Acme::MetaSyntactic - Themed metasyntactic variables names INST_FILE /usr/local/lib/perl/5.10.0/Acme/MetaSyntactic.pm INST_VERSION 0.99 cpan> a BOOK Author id = BOOK EMAIL [...] FULLNAME Philippe Bruhat (BooK) cpan> d BOOK/Acme-MetaSyntactic-0.99.tar.gz Distribution id = B/BO/BOOK/Acme-MetaSyntactic-0.99.tar.gz CPAN_USERID BOOK (Philippe Bruhat (BooK) <[...]>) CONTAINSMODS Acme::MetaSyntactic Acme::MetaSyntactic::Alias [...] UPLOAD_DATE 2006-11-06 cpan> m /lorem/ Module = Acme::MetaSyntactic::loremipsum (BOOK/Acme-MetaSyntactic-0.99.tar.gz) Module Text::Lorem (ADEOLA/Text-Lorem-0.3.tar.gz) Module Text::Lorem::More (RKRIMEN/Text-Lorem-More-0.12.tar.gz) Module Text::Lorem::More::Source (RKRIMEN/Text-Lorem-More-0.12.tar.gz) cpan> i /berlin/ Distribution BEATNIK/Filter-NumberLines-0.02.tar.gz Module = DateTime::TimeZone::Europe::Berlin (DROLSKY/DateTime-TimeZone-0.7904.tar.gz) Module Filter::NumberLines (BEATNIK/Filter-NumberLines-0.02.tar.gz) Author [...] The examples illustrate several aspects: the first three queries target modules, authors, or distros directly and yield exactly one result. The last two use regular expressions and yield several results. The last one targets all of bundles, modules, authors, and distros simultaneously. When more than one result is available, they are printed in one-line format. "get", "make", "test", "install", "clean" modules or distributions These commands take any number of arguments and investigate what is necessary to perform the action. Argument processing is as follows: known module name in format Foo/Bar.pm module other embedded slash distribution - with trailing slash dot directory enclosing slashes regexp known module name in format Foo::Bar module If the argument is a distribution file name (recognized by embedded slashes), it is processed. If it is a module, CPAN determines the distribution file in which this module is included and processes that, following any dependencies named in the module's META.yml or Makefile.PL (this behavior is controlled by the configuration parameter "prerequisites_policy"). If an argument is enclosed in slashes it is treated as a regular expression: it is expanded and if the result is a single object (distribution, bundle or module), this object is processed. Example: install Dummy::Perl # installs the module install AUXXX/Dummy-Perl-3.14.tar.gz # installs that distribution install /Dummy-Perl-3.14/ # same if the regexp is unambiguous "get" downloads a distribution file and untars or unzips it, "make" builds it, "test" runs the test suite, and "install" installs it. Any "make" or "test" is run unconditionally. An install <distribution_file> is also run unconditionally. But for install <module> CPAN checks whether an install is needed and prints *module up to date* if the distribution file containing the module doesn't need updating. CPAN also keeps track of what it has done within the current session and doesn't try to build a package a second time regardless of whether it succeeded or not. It does not repeat a test run if the test has been run successfully before. Same for install runs. The "force" pragma may precede another command (currently: "get", "make", "test", or "install") to execute the command from scratch and attempt to continue past certain errors. See the section below on the "force" and the "fforce" pragma. The "notest" pragma skips the test part in the build process. Example: cpan> notest install Tk A "clean" command results in a make clean being executed within the distribution file's working directory. "readme", "perldoc", "look" module or distribution "readme" displays the README file of the associated distribution. "Look" gets and untars (if not yet done) the distribution file, changes to the appropriate directory and opens a subshell process in that directory. "perldoc" displays the module's pod documentation in html or plain text format. "ls" author "ls" globbing_expression The first form lists all distribution files in and below an author's CPAN directory as stored in the CHECKSUMS files distributed on CPAN. The listing recurses into subdirectories. The second form limits or expands the output with shell globbing as in the following examples: ls JV/make* ls GSAR/*make* ls */*make* The last example is very slow and outputs extra progress indicators that break the alignment of the result. Note that globbing only lists directories explicitly asked for, for example FOO/* will not list FOO/bar/Acme-Sthg-n.nn.tar.gz. This may be regarded as a bug that may be changed in some future version. "failed" The "failed" command reports all distributions that failed on one of "make", "test" or "install" for some reason in the currently running shell session. Persistence between sessions If the "YAML" or the "YAML::Syck" module is installed a record of the internal state of all modules is written to disk after each step. The files contain a signature of the currently running perl version for later perusal. If the configurations variable "build_dir_reuse" is set to a true value, then CPAN.pm reads the collected YAML files. If the stored signature matches the currently running perl, the stored state is loaded into memory such that persistence between sessions is effectively established. The "force" and the "fforce" pragma To speed things up in complex installation scenarios, CPAN.pm keeps track of what it has already done and refuses to do some things a second time. A "get", a "make", and an "install" are not repeated. A "test" is repeated only if the previous test was unsuccessful. The diagnostic message when CPAN.pm refuses to do something a second time is one of *Has already been *"unwrapped|made|tested successfully" or something similar. Another situation where CPAN refuses to act is an "install" if the corresponding "test" was not successful. In all these cases, the user can override this stubborn behaviour by prepending the command with the word force, for example: cpan> force get Foo cpan> force make AUTHOR/Bar-3.14.tar.gz cpan> force test Baz cpan> force install Acme::Meta Each *forced* command is executed with the corresponding part of its memory erased. The "fforce" pragma is a variant that emulates a "force get" which erases the entire memory followed by the action specified, effectively restarting the whole get/make/test/install procedure from scratch. Lockfile Interactive sessions maintain a lockfile, by default "~/.cpan/.lock". Batch jobs can run without a lockfile and not disturb each other. The shell offers to run in *downgraded mode* when another process is holding the lockfile. This is an experimental feature that is not yet tested very well. This second shell then does not write the history file, does not use the metadata file, and has a different prompt. Signals CPAN.pm installs signal handlers for SIGINT and SIGTERM. While you are in the cpan-shell, it is intended that you can press "^C" anytime and return to the cpan-shell prompt. A SIGTERM will cause the cpan-shell to clean up and leave the shell loop. You can emulate the effect of a SIGTERM by sending two consecutive SIGINTs, which usually means by pressing "^C" twice. CPAN.pm ignores SIGPIPE. If the user sets "inactivity_timeout", a SIGALRM is used during the run of the "perl Makefile.PL" or "perl Build.PL" subprocess. A SIGALRM is also used during module version parsing, and is controlled by "version_timeout". CPAN::Shell The commands available in the shell interface are methods in the package CPAN::Shell. If you enter the shell command, your input is split by the Text::ParseWords::shellwords() routine, which acts like most shells do. The first word is interpreted as the method to be invoked, and the rest of the words are treated as the method's arguments. Continuation lines are supported by ending a line with a literal backslash. autobundle "autobundle" writes a bundle file into the "$CPAN::Config->{cpan_home}/Bundle" directory. The file contains a list of all modules that are both available from CPAN and currently installed within @INC. Duplicates of each distribution are suppressed. The name of the bundle file is based on the current date and a counter, e.g. Bundle/Snapshot_2012_05_21_00.pm. This is installed again by running "cpan Bundle::Snapshot_2012_05_21_00", or installing "Bundle::Snapshot_2012_05_21_00" from the CPAN shell. Return value: path to the written file. hosts Note: this feature is still in alpha state and may change in future versions of CPAN.pm This commands provides a statistical overview over recent download activities. The data for this is collected in the YAML file "FTPstats.yml" in your "cpan_home" directory. If no YAML module is configured or YAML not installed, no stats are provided. install_tested Install all distributions that have been tested successfully but have not yet been installed. See also "is_tested". is_tested List all build directories of distributions that have been tested successfully but have not yet been installed. See also "install_tested". mkmyconfig mkmyconfig() writes your own CPAN::MyConfig file into your "~/.cpan/" directory so that you can save your own preferences instead of the system-wide ones. r [Module|/Regexp/]... scans current perl installation for modules that have a newer version available on CPAN and provides a list of them. If called without argument, all potential upgrades are listed; if called with arguments the list is filtered to the modules and regexps given as arguments. The listing looks something like this: Package namespace installed latest in CPAN file CPAN 1.94_64 1.9600 ANDK/CPAN-1.9600.tar.gz CPAN::Reporter 1.1801 1.1902 DAGOLDEN/CPAN-Reporter-1.1902.tar.gz YAML 0.70 0.73 INGY/YAML-0.73.tar.gz YAML::Syck 1.14 1.17 AVAR/YAML-Syck-1.17.tar.gz YAML::Tiny 1.44 1.50 ADAMK/YAML-Tiny-1.50.tar.gz CGI 3.43 3.55 MARKSTOS/CGI.pm-3.55.tar.gz Module::Build::YAML 1.40 1.41 DAGOLDEN/Module-Build-0.3800.tar.gz TAP::Parser::Result::YAML 3.22 3.23 ANDYA/Test-Harness-3.23.tar.gz YAML::XS 0.34 0.35 INGY/YAML-LibYAML-0.35.tar.gz It suppresses duplicates in the column "in CPAN file" such that distributions with many upgradeable modules are listed only once. Note that the list is not sorted. recent ***EXPERIMENTAL COMMAND*** The "recent" command downloads a list of recent uploads to CPAN and displays them *slowly*. While the command is running, a $SIG{INT} exits the loop after displaying the current item. Note: This command requires XML::LibXML installed. Note: This whole command currently is just a hack and will probably change in future versions of CPAN.pm, but the general approach will likely remain. Note: See also smoke recompile recompile() is a special command that takes no argument and runs the make/test/install cycle with brute force over all installed dynamically loadable extensions (a.k.a. XS modules) with 'force' in effect. The primary purpose of this command is to finish a network installation. Imagine you have a common source tree for two different architectures. You decide to do a completely independent fresh installation. You start on one architecture with the help of a Bundle file produced earlier. CPAN installs the whole Bundle for you, but when you try to repeat the job on the second architecture, CPAN responds with a "Foo up to date" message for all modules. So you invoke CPAN's recompile on the second architecture and you're done. Another popular use for "recompile" is to act as a rescue in case your perl breaks binary compatibility. If one of the modules that CPAN uses is in turn depending on binary compatibility (so you cannot run CPAN commands), then you should try the CPAN::Nox module for recovery. report Bundle|Distribution|Module The "report" command temporarily turns on the "test_report" config variable, then runs the "force test" command with the given arguments. The "force" pragma reruns the tests and repeats every step that might have failed before. smoke ***EXPERIMENTAL COMMAND*** *** WARNING: this command downloads and executes software from CPAN to your computer of completely unknown status. You should never do this with your normal account and better have a dedicated well separated and secured machine to do this. *** The "smoke" command takes the list of recent uploads to CPAN as provided by the "recent" command and tests them all. While the command is running $SIG{INT} is defined to mean that the current item shall be skipped. Note: This whole command currently is just a hack and will probably change in future versions of CPAN.pm, but the general approach will likely remain. Note: See also recent upgrade [Module|/Regexp/]... The "upgrade" command first runs an "r" command with the given arguments and then installs the newest versions of all modules that were listed by that. The four "CPAN::*" Classes: Author, Bundle, Module, Distribution Although it may be considered internal, the class hierarchy does matter for both users and programmer. CPAN.pm deals with the four classes mentioned above, and those classes all share a set of methods. Classical single polymorphism is in effect. A metaclass object registers all objects of all kinds and indexes them with a string. The strings referencing objects have a separated namespace (well, not completely separated): Namespace Class words containing a "/" (slash) Distribution words starting with Bundle:: Bundle everything else Module or Author Modules know their associated Distribution objects. They always refer to the most recent official release. Developers may mark their releases as unstable development versions (by inserting an underscore into the module version number which will also be reflected in the distribution name when you run 'make dist'), so the really hottest and newest distribution is not always the default. If a module Foo circulates on CPAN in both version 1.23 and 1.23_90, CPAN.pm offers a convenient way to install version 1.23 by saying install Foo This would install the complete distribution file (say BAR/Foo-1.23.tar.gz) with all accompanying material. But if you would like to install version 1.23_90, you need to know where the distribution file resides on CPAN relative to the authors/id/ directory. If the author is BAR, this might be BAR/Foo-1.23_90.tar.gz; so you would have to say install BAR/Foo-1.23_90.tar.gz The first example will be driven by an object of the class CPAN::Module, the second by an object of class CPAN::Distribution. Integrating local directories Note: this feature is still in alpha state and may change in future versions of CPAN.pm Distribution objects are normally distributions from the CPAN, but there is a slightly degenerate case for Distribution objects, too, of projects held on the local disk. These distribution objects have the same name as the local directory and end with a dot. A dot by itself is also allowed for the current directory at the time CPAN.pm was used. All actions such as "make", "test", and "install" are applied directly to that directory. This gives the command "cpan ." an interesting touch: while the normal mantra of installing a CPAN module without CPAN.pm is one of perl Makefile.PL perl Build.PL ( go and get prerequisites ) make ./Build make test ./Build test make install ./Build install the command "cpan ." does all of this at once. It figures out which of the two mantras is appropriate, fetches and installs all prerequisites, takes care of them recursively, and finally finishes the installation of the module in the current directory, be it a CPAN module or not. The typical usage case is for private modules or working copies of projects from remote repositories on the local disk. Redirection The usual shell redirection symbols " | " and ">" are recognized by the cpan shell only when surrounded by whitespace. So piping to pager or redirecting output into a file works somewhat as in a normal shell, with the stipulation that you must type extra spaces. Plugin support ***EXPERIMENTAL*** Plugins are objects that implement any of currently eight methods: pre_get post_get pre_make post_make pre_test post_test pre_install post_install The "plugin_list" configuration parameter holds a list of strings of the form Modulename=arg0,arg1,arg2,arg3,... eg: CPAN::Plugin::Flurb=dir,/opt/pkgs/flurb/raw,verbose,1 At run time, each listed plugin is instantiated as a singleton object by running the equivalent of this pseudo code: my $plugin = <string representation from config>; <generate Modulename and arguments from $plugin>; my $p = $instance{$plugin} ||= Modulename->new($arg0,$arg1,...); The generated singletons are kept around from instantiation until the end of the shell session. <plugin_list> can be reconfigured at any time at run time. While the cpan shell is running, it checks all activated plugins at each of the 8 reference points listed above and runs the respective method if it is implemented for that object. The method is called with the active CPAN::Distribution object passed in as an argument. CONFIGURATION When the CPAN module is used for the first time, a configuration dialogue tries to determine a couple of site specific options. The result of the dialog is stored in a hash reference $CPAN::Config in a file CPAN/Config.pm. Default values defined in the CPAN/Config.pm file can be overridden in a user specific file: CPAN/MyConfig.pm. Such a file is best placed in "$HOME/.cpan/CPAN/MyConfig.pm", because "$HOME/.cpan" is added to the search path of the CPAN module before the use() or require() statements. The mkmyconfig command writes this file for you. The "o conf" command has various bells and whistles: completion support If you have a ReadLine module installed, you can hit TAB at any point of the commandline and "o conf" will offer you completion for the built-in subcommands and/or config variable names. displaying some help: o conf help Displays a short help displaying current values: o conf [KEY] Displays the current value(s) for this config variable. Without KEY, displays all subcommands and config variables. Example: o conf shell If KEY starts and ends with a slash, the string in between is treated as a regular expression and only keys matching this regexp are displayed Example: o conf /color/ changing of scalar values: o conf KEY VALUE Sets the config variable KEY to VALUE. The empty string can be specified as usual in shells, with '' or "" Example: o conf wget /usr/bin/wget changing of list values: o conf KEY SHIFT|UNSHIFT|PUSH|POP|SPLICE|LIST If a config variable name ends with "list", it is a list. "o conf KEY shift" removes the first element of the list, "o conf KEY pop" removes the last element of the list. "o conf KEYS unshift LIST" prepends a list of values to the list, "o conf KEYS push LIST" appends a list of valued to the list. Likewise, "o conf KEY splice LIST" passes the LIST to the corresponding splice command. Finally, any other list of arguments is taken as a new list value for the KEY variable discarding the previous value. Examples: o conf urllist unshift http://cpan.dev.local/CPAN o conf urllist splice 3 1 o conf urllist http://cpan1.local http://cpan2.local ftp://ftp.perl.org reverting to saved: o conf defaults Reverts all config variables to the state in the saved config file. saving the config: o conf commit Saves all config variables to the current config file (CPAN/Config.pm or CPAN/MyConfig.pm that was loaded at start). The configuration dialog can be started any time later again by issuing the command " o conf init " in the CPAN shell. A subset of the configuration dialog can be run by issuing "o conf init WORD" where WORD is any valid config variable or a regular expression. Config Variables The following keys in the hash reference $CPAN::Config are currently defined: allow_installing_module_downgrades allow or disallow installing module downgrades allow_installing_outdated_dists allow or disallow installing modules that are indexed in the cpan index pointing to a distro with a higher distro-version number applypatch path to external prg auto_commit commit all changes to config variables to disk build_cache size of cache for directories to build modules build_dir locally accessible directory to build modules build_dir_reuse boolean if distros in build_dir are persistent build_requires_install_policy to install or not to install when a module is only needed for building. yes|no|ask/yes|ask/no bzip2 path to external prg cache_metadata use serializer to cache metadata check_sigs if signatures should be verified cleanup_after_install remove build directory immediately after a successful install and remember that for the duration of the session colorize_debug Term::ANSIColor attributes for debugging output colorize_output boolean if Term::ANSIColor should colorize output colorize_print Term::ANSIColor attributes for normal output colorize_warn Term::ANSIColor attributes for warnings commandnumber_in_prompt boolean if you want to see current command number commands_quote preferred character to use for quoting external commands when running them. Defaults to double quote on Windows, single tick everywhere else; can be set to space to disable quoting connect_to_internet_ok whether to ask if opening a connection is ok before urllist is specified cpan_home local directory reserved for this package curl path to external prg dontload_hash DEPRECATED dontload_list arrayref: modules in the list will not be loaded by the CPAN::has_inst() routine ftp path to external prg ftp_passive if set, the environment variable FTP_PASSIVE is set for downloads ftp_proxy proxy host for ftp requests ftpstats_period max number of days to keep download statistics ftpstats_size max number of items to keep in the download statistics getcwd see below gpg path to external prg gzip location of external program gzip halt_on_failure stop processing after the first failure of queued items or dependencies histfile file to maintain history between sessions histsize maximum number of lines to keep in histfile http_proxy proxy host for http requests inactivity_timeout breaks interactive Makefile.PLs or Build.PLs after this many seconds inactivity. Set to 0 to disable timeouts. index_expire refetch index files after this many days inhibit_startup_message if true, suppress the startup message keep_source_where directory in which to keep the source (if we do) load_module_verbosity report loading of optional modules used by CPAN.pm lynx path to external prg make location of external make program make_arg arguments that should always be passed to 'make' make_install_make_command the make command for running 'make install', for example 'sudo make' make_install_arg same as make_arg for 'make install' makepl_arg arguments passed to 'perl Makefile.PL' mbuild_arg arguments passed to './Build' mbuild_install_arg arguments passed to './Build install' mbuild_install_build_command command to use instead of './Build' when we are in the install stage, for example 'sudo ./Build' mbuildpl_arg arguments passed to 'perl Build.PL' ncftp path to external prg ncftpget path to external prg no_proxy don't proxy to these hosts/domains (comma separated list) pager location of external program more (or any pager) password your password if you CPAN server wants one patch path to external prg patches_dir local directory containing patch files perl5lib_verbosity verbosity level for PERL5LIB additions plugin_list list of active hooks (see Plugin support above and the CPAN::Plugin module) prefer_external_tar per default all untar operations are done with Archive::Tar; by setting this variable to true the external tar command is used if available prefer_installer legal values are MB and EUMM: if a module comes with both a Makefile.PL and a Build.PL, use the former (EUMM) or the latter (MB); if the module comes with only one of the two, that one will be used no matter the setting prerequisites_policy what to do if you are missing module prerequisites ('follow' automatically, 'ask' me, or 'ignore') For 'follow', also sets PERL_AUTOINSTALL and PERL_EXTUTILS_AUTOINSTALL for "--defaultdeps" if not already set prefs_dir local directory to store per-distro build options proxy_user username for accessing an authenticating proxy proxy_pass password for accessing an authenticating proxy pushy_https use https to cpan.org when possible, otherwise use http to cpan.org and issue a warning randomize_urllist add some randomness to the sequence of the urllist recommends_policy whether recommended prerequisites should be included scan_cache controls scanning of cache ('atstart', 'atexit' or 'never') shell your favorite shell show_unparsable_versions boolean if r command tells which modules are versionless show_upload_date boolean if commands should try to determine upload date show_zero_versions boolean if r command tells for which modules $version==0 suggests_policy whether suggested prerequisites should be included tar location of external program tar tar_verbosity verbosity level for the tar command term_is_latin deprecated: if true Unicode is translated to ISO-8859-1 (and nonsense for characters outside latin range) term_ornaments boolean to turn ReadLine ornamenting on/off test_report email test reports (if CPAN::Reporter is installed) trust_test_report_history skip testing when previously tested ok (according to CPAN::Reporter history) unzip location of external program unzip urllist arrayref to nearby CPAN sites (or equivalent locations) urllist_ping_external use external ping command when autoselecting mirrors urllist_ping_verbose increase verbosity when autoselecting mirrors use_prompt_default set PERL_MM_USE_DEFAULT for configure/make/test/install use_sqlite use CPAN::SQLite for metadata storage (fast and lean) username your username if you CPAN server wants one version_timeout stops version parsing after this many seconds. Default is 15 secs. Set to 0 to disable. wait_list arrayref to a wait server to try (See CPAN::WAIT) wget path to external prg yaml_load_code enable YAML code deserialisation via CPAN::DeferredCode yaml_module which module to use to read/write YAML files You can set and query each of these options interactively in the cpan shell with the "o conf" or the "o conf init" command as specified below. "o conf <scalar option>" prints the current value of the *scalar option* "o conf <scalar option> <value>" Sets the value of the *scalar option* to *value* "o conf <list option>" prints the current value of the *list option* in MakeMaker's neatvalue format. "o conf <list option> [shift|pop]" shifts or pops the array in the *list option* variable "o conf <list option> [unshift|push|splice] <list>" works like the corresponding perl commands. interactive editing: o conf init [MATCH|LIST] Runs an interactive configuration dialog for matching variables. Without argument runs the dialog over all supported config variables. To specify a MATCH the argument must be enclosed by slashes. Examples: o conf init ftp_passive ftp_proxy o conf init /color/ Note: this method of setting config variables often provides more explanation about the functioning of a variable than the manpage. CPAN::anycwd($path): Note on config variable getcwd CPAN.pm changes the current working directory often and needs to determine its own current working directory. By default it uses Cwd::cwd, but if for some reason this doesn't work on your system, configure alternatives according to the following table: cwd Calls Cwd::cwd getcwd Calls Cwd::getcwd fastcwd Calls Cwd::fastcwd getdcwd Calls Cwd::getdcwd backtickcwd Calls the external command cwd. Note on the format of the urllist parameter urllist parameters are URLs according to RFC 1738. We do a little guessing if your URL is not compliant, but if you have problems with "file" URLs, please try the correct format. Either: file://localhost/whatever/ftp/pub/CPAN/ or file:///home/ftp/pub/CPAN/ The urllist parameter has CD-ROM support The "urllist" parameter of the configuration table contains a list of URLs used for downloading. If the list contains any "file" URLs, CPAN always tries there first. This feature is disabled for index files. So the recommendation for the owner of a CD-ROM with CPAN contents is: include your local, possibly outdated CD-ROM as a "file" URL at the end of urllist, e.g. o conf urllist push file://localhost/CDROM/CPAN CPAN.pm will then fetch the index files from one of the CPAN sites that come at the beginning of urllist. It will later check for each module to see whether there is a local copy of the most recent version. Another peculiarity of urllist is that the site that we could successfully fetch the last file from automatically gets a preference token and is tried as the first site for the next request. So if you add a new site at runtime it may happen that the previously preferred site will be tried another time. This means that if you want to disallow a site for the next transfer, it must be explicitly removed from urllist. Maintaining the urllist parameter If you have YAML.pm (or some other YAML module configured in "yaml_module") installed, CPAN.pm collects a few statistical data about recent downloads. You can view the statistics with the "hosts" command or inspect them directly by looking into the "FTPstats.yml" file in your "cpan_home" directory. To get some interesting statistics, it is recommended that "randomize_urllist" be set; this introduces some amount of randomness into the URL selection. The "requires" and "build_requires" dependency declarations Since CPAN.pm version 1.88_51 modules declared as "build_requires" by a distribution are treated differently depending on the config variable "build_requires_install_policy". By setting "build_requires_install_policy" to "no", such a module is not installed. It is only built and tested, and then kept in the list of tested but uninstalled modules. As such, it is available during the build of the dependent module by integrating the path to the "blib/arch" and "blib/lib" directories in the environment variable PERL5LIB. If "build_requires_install_policy" is set to "yes", then both modules declared as "requires" and those declared as "build_requires" are treated alike. By setting to "ask/yes" or "ask/no", CPAN.pm asks the user and sets the default accordingly. Configuration of the allow_installing_* parameters The "allow_installing_*" parameters are evaluated during the "make" phase. If set to "yes", they allow the testing and the installation of the current distro and otherwise have no effect. If set to "no", they may abort the build (preventing testing and installing), depending on the contents of the "blib/" directory. The "blib/" directory is the directory that holds all the files that would usually be installed in the "install" phase. "allow_installing_outdated_dists" compares the "blib/" directory with the CPAN index. If it finds something there that belongs, according to the index, to a different dist, it aborts the current build. "allow_installing_module_downgrades" compares the "blib/" directory with already installed modules, actually their version numbers, as determined by ExtUtils::MakeMaker or equivalent. If a to-be-installed module would downgrade an already installed module, the current build is aborted. An interesting twist occurs when a distroprefs document demands the installation of an outdated dist via goto while "allow_installing_outdated_dists" forbids it. Without additional provisions, this would let the "allow_installing_outdated_dists" win and the distroprefs lose. So the proper arrangement in such a case is to write a second distroprefs document for the distro that "goto" points to and overrule the "cpanconfig" there. E.g.: --- match: distribution: "^MAUKE/Keyword-Simple-0.04.tar.gz" goto: "MAUKE/Keyword-Simple-0.03.tar.gz" --- match: distribution: "^MAUKE/Keyword-Simple-0.03.tar.gz" cpanconfig: allow_installing_outdated_dists: yes Configuration for individual distributions (*Distroprefs*) (Note: This feature has been introduced in CPAN.pm 1.8854) Distributions on CPAN usually behave according to what we call the CPAN mantra. Or since the advent of Module::Build we should talk about two mantras: perl Makefile.PL perl Build.PL make ./Build make test ./Build test make install ./Build install But some modules cannot be built with this mantra. They try to get some extra data from the user via the environment, extra arguments, or interactively--thus disturbing the installation of large bundles like Phalanx100 or modules with many dependencies like Plagger. The distroprefs system of "CPAN.pm" addresses this problem by allowing the user to specify extra informations and recipes in YAML files to either * pass additional arguments to one of the four commands, * set environment variables * instantiate an Expect object that reads from the console, waits for some regular expressions and enters some answers * temporarily override assorted "CPAN.pm" configuration variables * specify dependencies the original maintainer forgot * disable the installation of an object altogether See the YAML and Data::Dumper files that come with the "CPAN.pm" distribution in the "distroprefs/" directory for examples. Filenames The YAML files themselves must have the ".yml" extension; all other files are ignored (for two exceptions see *Fallback Data::Dumper and Storable* below). The containing directory can be specified in "CPAN.pm" in the "prefs_dir" config variable. Try "o conf init prefs_dir" in the CPAN shell to set and activate the distroprefs system. Every YAML file may contain arbitrary documents according to the YAML specification, and every document is treated as an entity that can specify the treatment of a single distribution. Filenames can be picked arbitrarily; "CPAN.pm" always reads all files (in alphabetical order) and takes the key "match" (see below in *Language Specs*) as a hashref containing match criteria that determine if the current distribution matches the YAML document or not. Fallback Data::Dumper and Storable If neither your configured "yaml_module" nor YAML.pm is installed, CPAN.pm falls back to using Data::Dumper and Storable and looks for files with the extensions ".dd" or ".st" in the "prefs_dir" directory. These files are expected to contain one or more hashrefs. For Data::Dumper generated files, this is expected to be done with by defining $VAR1, $VAR2, etc. The YAML shell would produce these with the command ysh < somefile.yml > somefile.dd For Storable files the rule is that they must be constructed such that "Storable::retrieve(file)" returns an array reference and the array elements represent one distropref object each. The conversion from YAML would look like so: perl -MYAML=LoadFile -MStorable=nstore -e ' @y=LoadFile(shift); nstore(\@y, shift)' somefile.yml somefile.st In bootstrapping situations it is usually sufficient to translate only a few YAML files to Data::Dumper for crucial modules like "YAML::Syck", "YAML.pm" and "Expect.pm". If you prefer Storable over Data::Dumper, remember to pull out a Storable version that writes an older format than all the other Storable versions that will need to read them. Blueprint The following example contains all supported keywords and structures with the exception of "eexpect" which can be used instead of "expect". --- comment: "Demo" match: module: "Dancing::Queen" distribution: "^CHACHACHA/Dancing-" not_distribution: "\.zip$" perl: "/usr/local/cariba-perl/bin/perl" perlconfig: archname: "freebsd" not_cc: "gcc" env: DANCING_FLOOR: "Shubiduh" disabled: 1 cpanconfig: make: gmake pl: args: - "--somearg=specialcase" env: {} expect: - "Which is your favorite fruit" - "apple\n" make: args: - all - extra-all env: {} expect: [] commandline: "echo SKIPPING make" test: args: [] env: {} expect: [] install: args: [] env: WANT_TO_INSTALL: YES expect: - "Do you really want to install" - "y\n" patches: - "ABCDE/Fedcba-3.14-ABCDE-01.patch" depends: configure_requires: LWP: 5.8 build_requires: Test::Exception: 0.25 requires: Spiffy: 0.30 Language Specs Every YAML document represents a single hash reference. The valid keys in this hash are as follows: comment [scalar] A comment cpanconfig [hash] Temporarily override assorted "CPAN.pm" configuration variables. Supported are: "build_requires_install_policy", "check_sigs", "make", "make_install_make_command", "prefer_installer", "test_report". Please report as a bug when you need another one supported. depends [hash] *** EXPERIMENTAL FEATURE *** All three types, namely "configure_requires", "build_requires", and "requires" are supported in the way specified in the META.yml specification. The current implementation *merges* the specified dependencies with those declared by the package maintainer. In a future implementation this may be changed to override the original declaration. disabled [boolean] Specifies that this distribution shall not be processed at all. features [array] *** EXPERIMENTAL FEATURE *** Experimental implementation to deal with optional_features from META.yml. Still needs coordination with installer software and currently works only for META.yml declaring "dynamic_config=0". Use with caution. goto [string] The canonical name of a delegate distribution to install instead. Useful when a new version, although it tests OK itself, breaks something else or a developer release or a fork is already uploaded that is better than the last released version. install [hash] Processing instructions for the "make install" or "./Build install" phase of the CPAN mantra. See below under *Processing Instructions*. make [hash] Processing instructions for the "make" or "./Build" phase of the CPAN mantra. See below under *Processing Instructions*. match [hash] A hashref with one or more of the keys "distribution", "module", "perl", "perlconfig", and "env" that specify whether a document is targeted at a specific CPAN distribution or installation. Keys prefixed with "not_" negates the corresponding match. The corresponding values are interpreted as regular expressions. The "distribution" related one will be matched against the canonical distribution name, e.g. "AUTHOR/Foo-Bar-3.14.tar.gz". The "module" related one will be matched against *all* modules contained in the distribution until one module matches. The "perl" related one will be matched against $^X (but with the absolute path). The value associated with "perlconfig" is itself a hashref that is matched against corresponding values in the %Config::Config hash living in the "Config.pm" module. Keys prefixed with "not_" negates the corresponding match. The value associated with "env" is itself a hashref that is matched against corresponding values in the %ENV hash. Keys prefixed with "not_" negates the corresponding match. If more than one restriction of "module", "distribution", etc. is specified, the results of the separately computed match values must all match. If so, the hashref represented by the YAML document is returned as the preference structure for the current distribution. patches [array] An array of patches on CPAN or on the local disk to be applied in order via an external patch program. If the value for the "-p" parameter is 0 or 1 is determined by reading the patch beforehand. The path to each patch is either an absolute path on the local filesystem or relative to a patch directory specified in the "patches_dir" configuration variable or in the format of a canonical distro name. For examples please consult the distroprefs/ directory in the CPAN.pm distribution (these examples are not installed by default). Note: if the "applypatch" program is installed and "CPAN::Config" knows about it and a patch is written by the "makepatch" program, then "CPAN.pm" lets "applypatch" apply the patch. Both "makepatch" and "applypatch" are available from CPAN in the "JV/makepatch-*" distribution. pl [hash] Processing instructions for the "perl Makefile.PL" or "perl Build.PL" phase of the CPAN mantra. See below under *Processing Instructions*. test [hash] Processing instructions for the "make test" or "./Build test" phase of the CPAN mantra. See below under *Processing Instructions*. Processing Instructions args [array] Arguments to be added to the command line commandline A full commandline to run via "system()". During execution, the environment variable PERL is set to $^X (but with an absolute path). If "commandline" is specified, "args" is not used. eexpect [hash] Extended "expect". This is a hash reference with four allowed keys, "mode", "timeout", "reuse", and "talk". You must install the "Expect" module to use "eexpect". CPAN.pm does not install it for you. "mode" may have the values "deterministic" for the case where all questions come in the order written down and "anyorder" for the case where the questions may come in any order. The default mode is "deterministic". "timeout" denotes a timeout in seconds. Floating-point timeouts are OK. With "mode=deterministic", the timeout denotes the timeout per question; with "mode=anyorder" it denotes the timeout per byte received from the stream or questions. "talk" is a reference to an array that contains alternating questions and answers. Questions are regular expressions and answers are literal strings. The Expect module watches the stream from the execution of the external program ("perl Makefile.PL", "perl Build.PL", "make", etc.). For "mode=deterministic", the CPAN.pm injects the corresponding answer as soon as the stream matches the regular expression. For "mode=anyorder" CPAN.pm answers a question as soon as the timeout is reached for the next byte in the input stream. In this mode you can use the "reuse" parameter to decide what will happen with a question-answer pair after it has been used. In the default case (reuse=0) it is removed from the array, avoiding being used again accidentally. If you want to answer the question "Do you really want to do that" several times, then it must be included in the array at least as often as you want this answer to be given. Setting the parameter "reuse" to 1 makes this repetition unnecessary. env [hash] Environment variables to be set during the command expect [array] You must install the "Expect" module to use "expect". CPAN.pm does not install it for you. "expect: <array>" is a short notation for this "eexpect": eexpect: mode: deterministic timeout: 15 talk: <array> Schema verification with "Kwalify" If you have the "Kwalify" module installed (which is part of the Bundle::CPANxxl), then all your distroprefs files are checked for syntactic correctness. Example Distroprefs Files "CPAN.pm" comes with a collection of example YAML files. Note that these are really just examples and should not be used without care because they cannot fit everybody's purpose. After all, the authors of the packages that ask questions had a need to ask, so you should watch their questions and adjust the examples to your environment and your needs. You have been warned:-) PROGRAMMER'S INTERFACE If you do not enter the shell, shell commands are available both as methods ("CPAN::Shell->install(...)") and as functions in the calling package ("install(...)"). Before calling low-level commands, it makes sense to initialize components of CPAN you need, e.g.: CPAN::HandleConfig->load; CPAN::Shell::setup_output; CPAN::Index->reload; High-level commands do such initializations automatically. There's currently only one class that has a stable interface - CPAN::Shell. All commands that are available in the CPAN shell are methods of the class CPAN::Shell. The arguments on the commandline are passed as arguments to the method. So if you take for example the shell command notest install A B C the actually executed command is CPAN::Shell->notest("install","A","B","C"); Each of the commands that produce listings of modules ("r", "autobundle", "u") also return a list of the IDs of all modules within the list. expand($type,@things) The IDs of all objects available within a program are strings that can be expanded to the corresponding real objects with the "CPAN::Shell->expand("Module",@things)" method. Expand returns a list of CPAN::Module objects according to the @things arguments given. In scalar context, it returns only the first element of the list. expandany(@things) Like expand, but returns objects of the appropriate type, i.e. CPAN::Bundle objects for bundles, CPAN::Module objects for modules, and CPAN::Distribution objects for distributions. Note: it does not expand to CPAN::Author objects. Programming Examples This enables the programmer to do operations that combine functionalities that are available in the shell. # install everything that is outdated on my disk: perl -MCPAN -e 'CPAN::Shell->install(CPAN::Shell->r)' # install my favorite programs if necessary: for $mod (qw(Net::FTP Digest::SHA Data::Dumper)) { CPAN::Shell->install($mod); } # list all modules on my disk that have no VERSION number for $mod (CPAN::Shell->expand("Module","/./")) { next unless $mod->inst_file; # MakeMaker convention for undefined $VERSION: next unless $mod->inst_version eq "undef"; print "No VERSION in ", $mod->id, "\n"; } # find out which distribution on CPAN contains a module: print CPAN::Shell->expand("Module","Apache::Constants")->cpan_file Or if you want to schedule a *cron* job to watch CPAN, you could list all modules that need updating. First a quick and dirty way: perl -e 'use CPAN; CPAN::Shell->r;' If you don't want any output should all modules be up to date, parse the output of above command for the regular expression "/modules are up to date/" and decide to mail the output only if it doesn't match. If you prefer to do it more in a programmerish style in one single process, something like this may better suit you: # list all modules on my disk that have newer versions on CPAN for $mod (CPAN::Shell->expand("Module","/./")) { next unless $mod->inst_file; next if $mod->uptodate; printf "Module %s is installed as %s, could be updated to %s from CPAN\n", $mod->id, $mod->inst_version, $mod->cpan_version; } If that gives too much output every day, you may want to watch only for three modules. You can write for $mod (CPAN::Shell->expand("Module","/Apache|LWP|CGI/")) { as the first line instead. Or you can combine some of the above tricks: # watch only for a new mod_perl module $mod = CPAN::Shell->expand("Module","mod_perl"); exit if $mod->uptodate; # new mod_perl arrived, let me know all update recommendations CPAN::Shell->r; Methods in the other Classes CPAN::Author::as_glimpse() Returns a one-line description of the author CPAN::Author::as_string() Returns a multi-line description of the author CPAN::Author::email() Returns the author's email address CPAN::Author::fullname() Returns the author's name CPAN::Author::name() An alias for fullname CPAN::Bundle::as_glimpse() Returns a one-line description of the bundle CPAN::Bundle::as_string() Returns a multi-line description of the bundle CPAN::Bundle::clean() Recursively runs the "clean" method on all items contained in the bundle. CPAN::Bundle::contains() Returns a list of objects' IDs contained in a bundle. The associated objects may be bundles, modules or distributions. CPAN::Bundle::force($method,@args) Forces CPAN to perform a task that it normally would have refused to do. Force takes as arguments a method name to be called and any number of additional arguments that should be passed to the called method. The internals of the object get the needed changes so that CPAN.pm does not refuse to take the action. The "force" is passed recursively to all contained objects. See also the section above on the "force" and the "fforce" pragma. CPAN::Bundle::get() Recursively runs the "get" method on all items contained in the bundle CPAN::Bundle::inst_file() Returns the highest installed version of the bundle in either @INC or "$CPAN::Config->{cpan_home}". Note that this is different from CPAN::Module::inst_file. CPAN::Bundle::inst_version() Like CPAN::Bundle::inst_file, but returns the $VERSION CPAN::Bundle::uptodate() Returns 1 if the bundle itself and all its members are up-to-date. CPAN::Bundle::install() Recursively runs the "install" method on all items contained in the bundle CPAN::Bundle::make() Recursively runs the "make" method on all items contained in the bundle CPAN::Bundle::readme() Recursively runs the "readme" method on all items contained in the bundle CPAN::Bundle::test() Recursively runs the "test" method on all items contained in the bundle CPAN::Distribution::as_glimpse() Returns a one-line description of the distribution CPAN::Distribution::as_string() Returns a multi-line description of the distribution CPAN::Distribution::author Returns the CPAN::Author object of the maintainer who uploaded this distribution CPAN::Distribution::pretty_id() Returns a string of the form "AUTHORID/TARBALL", where AUTHORID is the author's PAUSE ID and TARBALL is the distribution filename. CPAN::Distribution::base_id() Returns the distribution filename without any archive suffix. E.g "Foo-Bar-0.01" CPAN::Distribution::clean() Changes to the directory where the distribution has been unpacked and runs "make clean" there. CPAN::Distribution::containsmods() Returns a list of IDs of modules contained in a distribution file. Works only for distributions listed in the 02packages.details.txt.gz file. This typically means that just most recent version of a distribution is covered. CPAN::Distribution::cvs_import() Changes to the directory where the distribution has been unpacked and runs something like cvs -d $cvs_root import -m $cvs_log $cvs_dir $userid v$version there. CPAN::Distribution::dir() Returns the directory into which this distribution has been unpacked. CPAN::Distribution::force($method,@args) Forces CPAN to perform a task that it normally would have refused to do. Force takes as arguments a method name to be called and any number of additional arguments that should be passed to the called method. The internals of the object get the needed changes so that CPAN.pm does not refuse to take the action. See also the section above on the "force" and the "fforce" pragma. CPAN::Distribution::get() Downloads the distribution from CPAN and unpacks it. Does nothing if the distribution has already been downloaded and unpacked within the current session. CPAN::Distribution::install() Changes to the directory where the distribution has been unpacked and runs the external command "make install" there. If "make" has not yet been run, it will be run first. A "make test" is issued in any case and if this fails, the install is cancelled. The cancellation can be avoided by letting "force" run the "install" for you. This install method only has the power to install the distribution if there are no dependencies in the way. To install an object along with all its dependencies, use CPAN::Shell->install. Note that install() gives no meaningful return value. See uptodate(). CPAN::Distribution::isa_perl() Returns 1 if this distribution file seems to be a perl distribution. Normally this is derived from the file name only, but the index from CPAN can contain a hint to achieve a return value of true for other filenames too. CPAN::Distribution::look() Changes to the directory where the distribution has been unpacked and opens a subshell there. Exiting the subshell returns. CPAN::Distribution::make() First runs the "get" method to make sure the distribution is downloaded and unpacked. Changes to the directory where the distribution has been unpacked and runs the external commands "perl Makefile.PL" or "perl Build.PL" and "make" there. CPAN::Distribution::perldoc() Downloads the pod documentation of the file associated with a distribution (in HTML format) and runs it through the external command *lynx* specified in "$CPAN::Config->{lynx}". If *lynx* isn't available, it converts it to plain text with the external command *html2text* and runs it through the pager specified in "$CPAN::Config->{pager}". CPAN::Distribution::prefs() Returns the hash reference from the first matching YAML file that the user has deposited in the "prefs_dir/" directory. The first succeeding match wins. The files in the "prefs_dir/" are processed alphabetically, and the canonical distro name (e.g. AUTHOR/Foo-Bar-3.14.tar.gz) is matched against the regular expressions stored in the $root->{match}{distribution} attribute value. Additionally all module names contained in a distribution are matched against the regular expressions in the $root->{match}{module} attribute value. The two match values are ANDed together. Each of the two attributes are optional. CPAN::Distribution::prereq_pm() Returns the hash reference that has been announced by a distribution as the "requires" and "build_requires" elements. These can be declared either by the "META.yml" (if authoritative) or can be deposited after the run of "Build.PL" in the file "./_build/prereqs" or after the run of "Makfile.PL" written as the "PREREQ_PM" hash in a comment in the produced "Makefile". *Note*: this method only works after an attempt has been made to "make" the distribution. Returns undef otherwise. CPAN::Distribution::readme() Downloads the README file associated with a distribution and runs it through the pager specified in "$CPAN::Config->{pager}". CPAN::Distribution::reports() Downloads report data for this distribution from www.cpantesters.org and displays a subset of them. CPAN::Distribution::read_yaml() Returns the content of the META.yml of this distro as a hashref. Note: works only after an attempt has been made to "make" the distribution. Returns undef otherwise. Also returns undef if the content of META.yml is not authoritative. (The rules about what exactly makes the content authoritative are still in flux.) CPAN::Distribution::test() Changes to the directory where the distribution has been unpacked and runs "make test" there. CPAN::Distribution::uptodate() Returns 1 if all the modules contained in the distribution are up-to-date. Relies on containsmods. CPAN::Index::force_reload() Forces a reload of all indices. CPAN::Index::reload() Reloads all indices if they have not been read for more than "$CPAN::Config->{index_expire}" days. CPAN::InfoObj::dump() CPAN::Author, CPAN::Bundle, CPAN::Module, and CPAN::Distribution inherit this method. It prints the data structure associated with an object. Useful for debugging. Note: the data structure is considered internal and thus subject to change without notice. CPAN::Module::as_glimpse() Returns a one-line description of the module in four columns: The first column contains the word "Module", the second column consists of one character: an equals sign if this module is already installed and up-to-date, a less-than sign if this module is installed but can be upgraded, and a space if the module is not installed. The third column is the name of the module and the fourth column gives maintainer or distribution information. CPAN::Module::as_string() Returns a multi-line description of the module CPAN::Module::clean() Runs a clean on the distribution associated with this module. CPAN::Module::cpan_file() Returns the filename on CPAN that is associated with the module. CPAN::Module::cpan_version() Returns the latest version of this module available on CPAN. CPAN::Module::cvs_import() Runs a cvs_import on the distribution associated with this module. CPAN::Module::description() Returns a 44 character description of this module. Only available for modules listed in The Module List (CPAN/modules/00modlist.long.html or 00modlist.long.txt.gz) CPAN::Module::distribution() Returns the CPAN::Distribution object that contains the current version of this module. CPAN::Module::dslip_status() Returns a hash reference. The keys of the hash are the letters "D", "S", "L", "I", and <P>, for development status, support level, language, interface and public licence respectively. The data for the DSLIP status are collected by pause.perl.org when authors register their namespaces. The values of the 5 hash elements are one-character words whose meaning is described in the table below. There are also 5 hash elements "DV", "SV", "LV", "IV", and <PV> that carry a more verbose value of the 5 status variables. Where the 'DSLIP' characters have the following meanings: D - Development Stage (Note: *NO IMPLIED TIMESCALES*): i - Idea, listed to gain consensus or as a placeholder c - under construction but pre-alpha (not yet released) a/b - Alpha/Beta testing R - Released M - Mature (no rigorous definition) S - Standard, supplied with Perl 5 S - Support Level: m - Mailing-list d - Developer u - Usenet newsgroup comp.lang.perl.modules n - None known, try comp.lang.perl.modules a - abandoned; volunteers welcome to take over maintenance L - Language Used: p - Perl-only, no compiler needed, should be platform independent c - C and perl, a C compiler will be needed h - Hybrid, written in perl with optional C code, no compiler needed + - C++ and perl, a C++ compiler will be needed o - perl and another language other than C or C++ I - Interface Style f - plain Functions, no references used h - hybrid, object and function interfaces available n - no interface at all (huh?) r - some use of unblessed References or ties O - Object oriented using blessed references and/or inheritance P - Public License p - Standard-Perl: user may choose between GPL and Artistic g - GPL: GNU General Public License l - LGPL: "GNU Lesser General Public License" (previously known as "GNU Library General Public License") b - BSD: The BSD License a - Artistic license alone 2 - Artistic license 2.0 or later o - open source: approved by www.opensource.org d - allows distribution without restrictions r - restricted distribution n - no license at all CPAN::Module::force($method,@args) Forces CPAN to perform a task it would normally refuse to do. Force takes as arguments a method name to be invoked and any number of additional arguments to pass that method. The internals of the object get the needed changes so that CPAN.pm does not refuse to take the action. See also the section above on the "force" and the "fforce" pragma. CPAN::Module::get() Runs a get on the distribution associated with this module. CPAN::Module::inst_file() Returns the filename of the module found in @INC. The first file found is reported, just as perl itself stops searching @INC once it finds a module. CPAN::Module::available_file() Returns the filename of the module found in PERL5LIB or @INC. The first file found is reported. The advantage of this method over "inst_file" is that modules that have been tested but not yet installed are included because PERL5LIB keeps track of tested modules. CPAN::Module::inst_version() Returns the version number of the installed module in readable format. CPAN::Module::available_version() Returns the version number of the available module in readable format. CPAN::Module::install() Runs an "install" on the distribution associated with this module. CPAN::Module::look() Changes to the directory where the distribution associated with this module has been unpacked and opens a subshell there. Exiting the subshell returns. CPAN::Module::make() Runs a "make" on the distribution associated with this module. CPAN::Module::manpage_headline() If module is installed, peeks into the module's manpage, reads the headline, and returns it. Moreover, if the module has been downloaded within this session, does the equivalent on the downloaded module even if it hasn't been installed yet. CPAN::Module::perldoc() Runs a "perldoc" on this module. CPAN::Module::readme() Runs a "readme" on the distribution associated with this module. CPAN::Module::reports() Calls the reports() method on the associated distribution object. CPAN::Module::test() Runs a "test" on the distribution associated with this module. CPAN::Module::uptodate() Returns 1 if the module is installed and up-to-date. CPAN::Module::userid() Returns the author's ID of the module. Cache Manager Currently the cache manager only keeps track of the build directory ($CPAN::Config->{build_dir}). It is a simple FIFO mechanism that deletes complete directories below "build_dir" as soon as the size of all directories there gets bigger than $CPAN::Config->{build_cache} (in MB). The contents of this cache may be used for later re-installations that you intend to do manually, but will never be trusted by CPAN itself. This is due to the fact that the user might use these directories for building modules on different architectures. There is another directory ($CPAN::Config->{keep_source_where}) where the original distribution files are kept. This directory is not covered by the cache manager and must be controlled by the user. If you choose to have the same directory as build_dir and as keep_source_where directory, then your sources will be deleted with the same fifo mechanism. Bundles A bundle is just a perl module in the namespace Bundle:: that does not define any functions or methods. It usually only contains documentation. It starts like a perl module with a package declaration and a $VERSION variable. After that the pod section looks like any other pod with the only difference being that *one special pod section* exists starting with (verbatim): =head1 CONTENTS In this pod section each line obeys the format Module_Name [Version_String] [- optional text] The only required part is the first field, the name of a module (e.g. Foo::Bar, i.e. *not* the name of the distribution file). The rest of the line is optional. The comment part is delimited by a dash just as in the man page header. The distribution of a bundle should follow the same convention as other distributions. Bundles are treated specially in the CPAN package. If you say 'install Bundle::Tkkit' (assuming such a bundle exists), CPAN will install all the modules in the CONTENTS section of the pod. You can install your own Bundles locally by placing a conformant Bundle file somewhere into your @INC path. The autobundle() command which is available in the shell interface does that for you by including all currently installed modules in a snapshot bundle file. PREREQUISITES The CPAN program is trying to depend on as little as possible so the user can use it in hostile environment. It works better the more goodies the environment provides. For example if you try in the CPAN shell install Bundle::CPAN or install Bundle::CPANxxl you will find the shell more convenient than the bare shell before. If you have a local mirror of CPAN and can access all files with "file:" URLs, then you only need a perl later than perl5.003 to run this module. Otherwise Net::FTP is strongly recommended. LWP may be required for non-UNIX systems, or if your nearest CPAN site is associated with a URL that is not "ftp:". If you have neither Net::FTP nor LWP, there is a fallback mechanism implemented for an external ftp command or for an external lynx command. UTILITIES Finding packages and VERSION This module presumes that all packages on CPAN * declare their $VERSION variable in an easy to parse manner. This prerequisite can hardly be relaxed because it consumes far too much memory to load all packages into the running program just to determine the $VERSION variable. Currently all programs that are dealing with version use something like this perl -MExtUtils::MakeMaker -le \ 'print MM->parse_version(shift)' filename If you are author of a package and wonder if your $VERSION can be parsed, please try the above method. * come as compressed or gzipped tarfiles or as zip files and contain a "Makefile.PL" or "Build.PL" (well, we try to handle a bit more, but with little enthusiasm). Debugging Debugging this module is more than a bit complex due to interference from the software producing the indices on CPAN, the mirroring process on CPAN, packaging, configuration, synchronicity, and even (gasp!) due to bugs within the CPAN.pm module itself. For debugging the code of CPAN.pm itself in interactive mode, some debugging aid can be turned on for most packages within CPAN.pm with one of o debug package... sets debug mode for packages. o debug -package... unsets debug mode for packages. o debug all turns debugging on for all packages. o debug number which sets the debugging packages directly. Note that "o debug 0" turns debugging off. What seems a successful strategy is the combination of "reload cpan" and the debugging switches. Add a new debug statement while running in the shell and then issue a "reload cpan" and see the new debugging messages immediately without losing the current context. "o debug" without an argument lists the valid package names and the current set of packages in debugging mode. "o debug" has built-in completion support. For debugging of CPAN data there is the "dump" command which takes the same arguments as make/test/install and outputs each object's Data::Dumper dump. If an argument looks like a perl variable and contains one of "$", "@" or "%", it is eval()ed and fed to Data::Dumper directly. Floppy, Zip, Offline Mode CPAN.pm works nicely without network access, too. If you maintain machines that are not networked at all, you should consider working with "file:" URLs. You'll have to collect your modules somewhere first. So you might use CPAN.pm to put together all you need on a networked machine. Then copy the $CPAN::Config->{keep_source_where} (but not $CPAN::Config->{build_dir}) directory on a floppy. This floppy is kind of a personal CPAN. CPAN.pm on the non-networked machines works nicely with this floppy. See also below the paragraph about CD-ROM support. Basic Utilities for Programmers has_inst($module) Returns true if the module is installed. Used to load all modules into the running CPAN.pm that are considered optional. The config variable "dontload_list" intercepts the "has_inst()" call such that an optional module is not loaded despite being available. For example, the following command will prevent "YAML.pm" from being loaded: cpan> o conf dontload_list push YAML See the source for details. use_inst($module) Similary to has_inst() tries to load optional library but also dies if library is not available has_usable($module) Returns true if the module is installed and in a usable state. Only useful for a handful of modules that are used internally. See the source for details. instance($module) The constructor for all the singletons used to represent modules, distributions, authors, and bundles. If the object already exists, this method returns the object; otherwise, it calls the constructor. frontend() frontend($new_frontend) Getter/setter for frontend object. Method just allows to subclass CPAN.pm. SECURITY There's no strong security layer in CPAN.pm. CPAN.pm helps you to install foreign, unmasked, unsigned code on your machine. We compare to a checksum that comes from the net just as the distribution file itself. But we try to make it easy to add security on demand: Cryptographically signed modules Since release 1.77, CPAN.pm has been able to verify cryptographically signed module distributions using Module::Signature. The CPAN modules can be signed by their authors, thus giving more security. The simple unsigned MD5 checksums that were used before by CPAN protect mainly against accidental file corruption. You will need to have Module::Signature installed, which in turn requires that you have at least one of Crypt::OpenPGP module or the command-line gpg tool installed. You will also need to be able to connect over the Internet to the public key servers, like pgp.mit.edu, and their port 11731 (the HKP protocol). The configuration parameter check_sigs is there to turn signature checking on or off. EXPORT Most functions in package CPAN are exported by default. The reason for this is that the primary use is intended for the cpan shell or for one-liners. ENVIRONMENT When the CPAN shell enters a subshell via the look command, it sets the environment CPAN_SHELL_LEVEL to 1, or increments that variable if it is already set. When CPAN runs, it sets the environment variable PERL5_CPAN_IS_RUNNING to the ID of the running process. It also sets PERL5_CPANPLUS_IS_RUNNING to prevent runaway processes which could happen with older versions of Module::Install. When running "perl Makefile.PL", the environment variable "PERL5_CPAN_IS_EXECUTING" is set to the full path of the "Makefile.PL" that is being executed. This prevents runaway processes with newer versions of Module::Install. When the config variable ftp_passive is set, all downloads will be run with the environment variable FTP_PASSIVE set to this value. This is in general a good idea as it influences both Net::FTP and LWP based connections. The same effect can be achieved by starting the cpan shell with this environment variable set. For Net::FTP alone, one can also always set passive mode by running libnetcfg. POPULATE AN INSTALLATION WITH LOTS OF MODULES Populating a freshly installed perl with one's favorite modules is pretty easy if you maintain a private bundle definition file. To get a useful blueprint of a bundle definition file, the command autobundle can be used on the CPAN shell command line. This command writes a bundle definition file for all modules installed for the current perl interpreter. It's recommended to run this command once only, and from then on maintain the file manually under a private name, say Bundle/my_bundle.pm. With a clever bundle file you can then simply say cpan> install Bundle::my_bundle then answer a few questions and go out for coffee (possibly even in a different city). Maintaining a bundle definition file means keeping track of two things: dependencies and interactivity. CPAN.pm sometimes fails on calculating dependencies because not all modules define all MakeMaker attributes correctly, so a bundle definition file should specify prerequisites as early as possible. On the other hand, it's annoying that so many distributions need some interactive configuring. So what you can try to accomplish in your private bundle file is to have the packages that need to be configured early in the file and the gentle ones later, so you can go out for coffee after a few minutes and leave CPAN.pm to churn away unattended. WORKING WITH CPAN.pm BEHIND FIREWALLS Thanks to Graham Barr for contributing the following paragraphs about the interaction between perl, and various firewall configurations. For further information on firewalls, it is recommended to consult the documentation that comes with the *ncftp* program. If you are unable to go through the firewall with a simple Perl setup, it is likely that you can configure *ncftp* so that it works through your firewall. Three basic types of firewalls Firewalls can be categorized into three basic types. http firewall This is when the firewall machine runs a web server, and to access the outside world, you must do so via that web server. If you set environment variables like http_proxy or ftp_proxy to values beginning with http://, or in your web browser you've proxy information set, then you know you are running behind an http firewall. To access servers outside these types of firewalls with perl (even for ftp), you need LWP or HTTP::Tiny. ftp firewall This where the firewall machine runs an ftp server. This kind of firewall will only let you access ftp servers outside the firewall. This is usually done by connecting to the firewall with ftp, then entering a username like "[email protected]". To access servers outside these type of firewalls with perl, you need Net::FTP. One-way visibility One-way visibility means these firewalls try to make themselves invisible to users inside the firewall. An FTP data connection is normally created by sending your IP address to the remote server and then listening for the return connection. But the remote server will not be able to connect to you because of the firewall. For these types of firewall, FTP connections need to be done in a passive mode. There are two that I can think off. SOCKS If you are using a SOCKS firewall, you will need to compile perl and link it with the SOCKS library. This is what is normally called a 'socksified' perl. With this executable you will be able to connect to servers outside the firewall as if it were not there. IP Masquerade This is when the firewall implemented in the kernel (via NAT, or networking address translation), it allows you to hide a complete network behind one IP address. With this firewall no special compiling is needed as you can access hosts directly. For accessing ftp servers behind such firewalls you usually need to set the environment variable "FTP_PASSIVE" or the config variable ftp_passive to a true value. Configuring lynx or ncftp for going through a firewall If you can go through your firewall with e.g. lynx, presumably with a command such as /usr/local/bin/lynx -pscott:tiger then you would configure CPAN.pm with the command o conf lynx "/usr/local/bin/lynx -pscott:tiger" That's all. Similarly for ncftp or ftp, you would configure something like o conf ncftp "/usr/bin/ncftp -f /home/scott/ncftplogin.cfg" Your mileage may vary... FAQ 1) I installed a new version of module X but CPAN keeps saying, I have the old version installed Probably you do have the old version installed. This can happen if a module installs itself into a different directory in the @INC path than it was previously installed. This is not really a CPAN.pm problem, you would have the same problem when installing the module manually. The easiest way to prevent this behaviour is to add the argument "UNINST=1" to the "make install" call, and that is why many people add this argument permanently by configuring o conf make_install_arg UNINST=1 2) So why is UNINST=1 not the default? Because there are people who have their precise expectations about who may install where in the @INC path and who uses which @INC array. In fine tuned environments "UNINST=1" can cause damage. 3) I want to clean up my mess, and install a new perl along with all modules I have. How do I go about it? Run the autobundle command for your old perl and optionally rename the resulting bundle file (e.g. Bundle/mybundle.pm), install the new perl with the Configure option prefix, e.g. ./Configure -Dprefix=/usr/local/perl-5.6.78.9 Install the bundle file you produced in the first step with something like cpan> install Bundle::mybundle and you're done. 4) When I install bundles or multiple modules with one command there is too much output to keep track of. You may want to configure something like o conf make_arg "| tee -ai /root/.cpan/logs/make.out" o conf make_install_arg "| tee -ai /root/.cpan/logs/make_install.out" so that STDOUT is captured in a file for later inspection. 5) I am not root, how can I install a module in a personal directory? As of CPAN 1.9463, if you do not have permission to write the default perl library directories, CPAN's configuration process will ask you whether you want to bootstrap <local::lib>, which makes keeping a personal perl library directory easy. Another thing you should bear in mind is that the UNINST parameter can be dangerous when you are installing into a private area because you might accidentally remove modules that other people depend on that are not using the private area. 6) How to get a package, unwrap it, and make a change before building it? Have a look at the "look" (!) command. 7) I installed a Bundle and had a couple of fails. When I retried, everything resolved nicely. Can this be fixed to work on first try? The reason for this is that CPAN does not know the dependencies of all modules when it starts out. To decide about the additional items to install, it just uses data found in the META.yml file or the generated Makefile. An undetected missing piece breaks the process. But it may well be that your Bundle installs some prerequisite later than some depending item and thus your second try is able to resolve everything. Please note, CPAN.pm does not know the dependency tree in advance and cannot sort the queue of things to install in a topologically correct order. It resolves perfectly well if all modules declare the prerequisites correctly with the PREREQ_PM attribute to MakeMaker or the "requires" stanza of Module::Build. For bundles which fail and you need to install often, it is recommended to sort the Bundle definition file manually. 8) In our intranet, we have many modules for internal use. How can I integrate these modules with CPAN.pm but without uploading the modules to CPAN? Have a look at the CPAN::Site module. 9) When I run CPAN's shell, I get an error message about things in my "/etc/inputrc" (or "~/.inputrc") file. These are readline issues and can only be fixed by studying readline configuration on your architecture and adjusting the referenced file accordingly. Please make a backup of the "/etc/inputrc" or "~/.inputrc" and edit them. Quite often harmless changes like uppercasing or lowercasing some arguments solves the problem. 10) Some authors have strange characters in their names. Internally CPAN.pm uses the UTF-8 charset. If your terminal is expecting ISO-8859-1 charset, a converter can be activated by setting term_is_latin to a true value in your config file. One way of doing so would be cpan> o conf term_is_latin 1 If other charset support is needed, please file a bug report against CPAN.pm at rt.cpan.org and describe your needs. Maybe we can extend the support or maybe UTF-8 terminals become widely available. Note: this config variable is deprecated and will be removed in a future version of CPAN.pm. It will be replaced with the conventions around the family of $LANG and $LC_* environment variables. 11) When an install fails for some reason and then I correct the error condition and retry, CPAN.pm refuses to install the module, saying "Already tried without success". Use the force pragma like so force install Foo::Bar Or you can use look Foo::Bar and then "make install" directly in the subshell. 12) How do I install a "DEVELOPER RELEASE" of a module? By default, CPAN will install the latest non-developer release of a module. If you want to install a dev release, you have to specify the partial path starting with the author id to the tarball you wish to install, like so: cpan> install KWILLIAMS/Module-Build-0.27_07.tar.gz Note that you can use the "ls" command to get this path listed. 13) How do I install a module and all its dependencies from the commandline, without being prompted for anything, despite my CPAN configuration (or lack thereof)? CPAN uses ExtUtils::MakeMaker's prompt() function to ask its questions, so if you set the PERL_MM_USE_DEFAULT environment variable, you shouldn't be asked any questions at all (assuming the modules you are installing are nice about obeying that variable as well): % PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'install My::Module' 14) How do I create a Module::Build based Build.PL derived from an ExtUtils::MakeMaker focused Makefile.PL? http://search.cpan.org/dist/Module-Build-Convert/ 15) I'm frequently irritated with the CPAN shell's inability to help me select a good mirror. CPAN can now help you select a "good" mirror, based on which ones have the lowest 'ping' round-trip times. From the shell, use the command 'o conf init urllist' and allow CPAN to automatically select mirrors for you. Beyond that help, the urllist config parameter is yours. You can add and remove sites at will. You should find out which sites have the best up-to-dateness, bandwidth, reliability, etc. and are topologically close to you. Some people prefer fast downloads, others up-to-dateness, others reliability. You decide which to try in which order. Henk P. Penning maintains a site that collects data about CPAN sites: http://mirrors.cpan.org/ Also, feel free to play with experimental features. Run o conf init randomize_urllist ftpstats_period ftpstats_size and choose your favorite parameters. After a few downloads running the "hosts" command will probably assist you in choosing the best mirror sites. 16) Why do I get asked the same questions every time I start the shell? You can make your configuration changes permanent by calling the command "o conf commit". Alternatively set the "auto_commit" variable to true by running "o conf init auto_commit" and answering the following question with yes. 17) Older versions of CPAN.pm had the original root directory of all tarballs in the build directory. Now there are always random characters appended to these directory names. Why was this done? The random characters are provided by File::Temp and ensure that each module's individual build directory is unique. This makes running CPAN.pm in concurrent processes simultaneously safe. 18) Speaking of the build directory. Do I have to clean it up myself? You have the choice to set the config variable "scan_cache" to "never". Then you must clean it up yourself. The other possible values, "atstart" and "atexit" clean up the build directory when you start (or more precisely, after the first extraction into the build directory) or exit the CPAN shell, respectively. If you never start up the CPAN shell, you probably also have to clean up the build directory yourself. 19) How can I switch to sudo instead of local::lib? The following 5 environment veriables need to be reset to the previous values: PATH, PERL5LIB, PERL_LOCAL_LIB_ROOT, PERL_MB_OPT, PERL_MM_OPT; and these two CPAN.pm config variables must be reconfigured: make_install_make_command and mbuild_install_build_command. The five env variables have probably been overwritten in your $HOME/.bashrc or some equivalent. You either find them there and delete their traces and logout/login or you override them temporarily, depending on your exact desire. The two cpanpm config variables can be set with: o conf init /install_.*_command/ probably followed by o conf commit COMPATIBILITY OLD PERL VERSIONS CPAN.pm is regularly tested to run under 5.005 and assorted newer versions. It is getting more and more difficult to get the minimal prerequisites working on older perls. It is close to impossible to get the whole Bundle::CPAN working there. If you're in the position to have only these old versions, be advised that CPAN is designed to work fine without the Bundle::CPAN installed. To get things going, note that GBARR/Scalar-List-Utils-1.18.tar.gz is compatible with ancient perls and that File::Temp is listed as a prerequisite but CPAN has reasonable workarounds if it is missing. CPANPLUS This module and its competitor, the CPANPLUS module, are both much cooler than the other. CPAN.pm is older. CPANPLUS was designed to be more modular, but it was never intended to be compatible with CPAN.pm. CPANMINUS In the year 2010 App::cpanminus was launched as a new approach to a cpan shell with a considerably smaller footprint. Very cool stuff. SECURITY ADVICE This software enables you to upgrade software on your computer and so is inherently dangerous because the newly installed software may contain bugs and may alter the way your computer works or even make it unusable. Please consider backing up your data before every upgrade. BUGS Please report bugs via <http://rt.cpan.org/> Before submitting a bug, please make sure that the traditional method of building a Perl module package from a shell by following the installation instructions of that package still works in your environment. AUTHOR Andreas Koenig "<[email protected]>" LICENSE This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html> TRANSLATIONS Kawai,Takanori provides a Japanese translation of a very old version of this manpage at <http://homepage3.nifty.com/hippo2000/perltips/CPAN.htm> SEE ALSO Many people enter the CPAN shell by running the cpan utility program which is installed in the same directory as perl itself. So if you have this directory in your PATH variable (or some equivalent in your operating system) then typing "cpan" in a console window will work for you as well. Above that the utility provides several commandline shortcuts. melezhik (Alexey) sent me a link where he published a chef recipe to work with CPAN.pm: http://community.opscode.com/cookbooks/cpan.
Hi,
I am enabling ppc64le's build on travis-ci so added the arch "ppc64le" in .travis.yml , but it's always failing. I have copy/pasted the error part of the log below (full log can be tracked on : https://travis-ci.com/github/sanjay-cpu/cpanpm/builds/182273956). Please have a look on this.
".........................................
..........................................
$ cpanm --version
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
The build has been terminated"
(moved from https://rt.cpan.org/Ticket/Display.html?id=99613)
I have just spent a long time trying to debug why a long CPAN build job
sometimes produced output like this:
Building Module-Runtime
Installing /opt/OSAGperlm/lib/Module/Runtime.pm
Installing none/Module::Runtime.3
ZEFRAM/Module-Runtime-0.014.tar.gz
./Build install -- OK
make[1]: Entering directory '/usr/src/packages/src/OSAGperlm.dws/cpan/build/Module-Runtime-0.014-RFZP5p'
make[1]: *** No targets specified and no makefile found. Stop.
make[1]: Leaving directory '/usr/src/packages/src/OSAGperlm.dws/cpan/build/Module-Runtime-0.014-RFZP5p'
DROLSKY/Module-Implementation-0.09.tar.gz
make -- NOT OK
Or this:
make[1]: Leaving directory '/usr/src/packages/src/OSAGperlm.dws/cpan/build/Test-Warn-0.30-_wIub_'
CHORNY/Test-Warn-0.30.tar.gz
make install -- OK
Alert: no Build file available for 'make ' in cwd[/usr/src/packages/src/OSAGperlm.dws/cpan/build/Test-Warn-0.30-_wIub_]. Danger, Will Robinson!
Can't exec "./Build": No such file or directory at /opt/OSAGperl/lib/5.20.1/CPAN/Distribution.pm line 2194.
BAREFOOT/Method-Signatures-20140224.tar.gz
./Build -- NOT OK
Note how the cwd is Test-Warn, but CPAN is currently trying to build Method-Signatures.
What I found is the following code in CPAN::Distribution::make:
unless (chdir $builddir) {
$CPAN::Frontend->mywarn("Couldn't chdir to '$builddir': $!");
return;
}
...
# this changes the "chdir":
my $satisfied = eval { $self->satisfy_requires };
...
if ($self->{modulebuild}) {
unless (-f "Build" || ($^O eq 'VMS' && -f 'Build.com')) {
my $cwd = CPAN::anycwd();
$CPAN::Frontend->mywarn("Alert: no Build file available for 'make $self->{id}'".
If I accidentally forget to type "install" in "install MIME::Entity" then I get a weird error message from the cpan shell:
cpan[1]> MIME::Entity
Catching error: "Can't locate object method "Entity" via package "MIME" (perhaps you forgot to load "MIME"?) at C:/perl/lib/CPAN.pm line 376, line 1.\cJ" at C:/perl/lib/CPAN.pm line 392, line 1.
CPAN::shell() called at C:/perl/lib/App/Cpan.pm line 395
App::Cpan::_process_options("App::Cpan") called at C:/perl/lib/App/Cpan.pm line 492
App::Cpan::run("App::Cpan") called at C:\perl\bin/cpan line 10
(This is using CPAN.pm v2.10.)
I really wish I could control the urllist from the command-line, similar to the --mirror option that cpanm
has. In fact, I would suggest calling the command-line switch --mirror
just to be consistent. And if the URLs given at the command-line contain userinfo (e.g. name, password) it should honor them too.
This issue originated here
I can't reopen #39 , but I have my cpan(1) stuff ready to merge into this repo. I'm waiting for some feedback, though. I'd like to hold off on further fixes until this is resolved.
Newly installed debian boxes are missing 'make'. While it's an easy one to fix, it's highly non-obvious from the output of
Writing MYMETA.yml
DOY/Try-Tiny-0.18.tar.gz
make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Running make for R/RJ/RJBS/Test-Fatal-0.013.tar.gz
Has already been unwrapped into directory /root/.cpan/build/Test-Fatal-0.013-f9ylST
CPAN.pm: Going to build R/RJ/RJBS/Test-Fatal-0.013.tar.gz
that this is the case.
Doubly so when the toplevel dependency I wanted to install was Module::Build-driven so didn't depend on having 'make'.. this EU:MM-dependent module fails deep in the deptree, and causes much headscratching until the cause is found.
Would it be possible to have CPAN reliably detect a complete utter lack of an executable called 'make', and produce some error looking like:
make: No such file or directory
then a complete stop? That way it would be much clearer.
Thanks
for example in ruby you can install gem with
gem install yaml-lint --http-proxy=http://username:[email protected]:3128
so I want to install perl module with
cpan Moo --http-proxy=http://username:[email protected]:3128
Hi,
I've been assigned CPAN as part of the CPAN Pull Request Challenge... for August :)
I've looked through RT and GitHub tickets trying to find anything that I could turn into a PR, but so far don't see anything that could be done by a perl newbie, like me.
Do you have any suggestions?
Let me know,
Scott
If cpan Foo
pulls in a recommend reqiures
of Bar
which fails to install AND it happens to be the last thing CPAN.pm
is processing, the result will be a non-zero exit due to this.
An log of a session exhibiting the problem can be seen in the attachment here.
Many thanks to @xdg for quickly finding this.
I'm transferring and splitting up some issues reported in App::Cpan many problems, multiple fixes.
While downloading distro files, the internal _download
function returns a hash reference instead of the exit value expected by the dispatcher. As such, the exit value never indicates a successful operation.
Patch provided by "eponymous alias" [email protected] in the RT ticket
App.Cpan.patch.txt
$ cpan -O
CPAN: Storable loaded ok (v2.51)
Reading '/home/felix/.cpan/Metadata'
Database was generated on Sat, 02 Jul 2016 08:41:02 GMT
Module Name Local CPAN
-------------------------------------------------------------------------
Can't locate object method "inst_file" via package "AAA::Demo" (perhaps you forgot to
load "AAA::Demo"?) at /usr/local/share/perl/5.20.1/App/Cpan.pm line 1339.
App::Cpan ( Version 1.64 )
-------------------------------------
1330 sub _show_out_of_date
1331 {
1332 my $modules = _get_all_namespaces();
1333
1334 printf "%-40s %6s %6s\n", "Module Name", "Local", "CPAN";
1335 print "-" x 73, "\n";
1336
1337 foreach my $module ( @$modules )
1338 {
1339 next unless $module->inst_file;
1340 next if $module->uptodate;
1341 printf "%-40s %.4f %.4f\n",
1342 $module->id,
1343 $module->inst_version ? $module->inst_version : '',
1344 $module->cpan_version;
1345 }
1346
1347 return HEY_IT_WORKED;
1348 }
It looks like the issue is that @$modules is returning a list of module names as strings, but inside the for loop, it is expecting Cpan::Module objects.
Suggested patch:
1337c1337
< foreach my $module ( @$modules )
---
> foreach my $module_name ( @$modules )
1338a1339,1340
> my $module = _expand_module( $module_name );
> next unless $module;
I'm ready to merge the App::Cpan stuff. Before, you grabbed the module and the script, but I also have a lot of tests. How do you want me to merge those? I like having subdirectories of t/ to hold groups of related tests.
I've been having trouble with various CI systems lately because I let CPAN.pm auto configure itself (for instance, this run on PerlPowerTools). Sometime it selects dead mirrors. MIRRORED.BY lists http://mirrors-usa.go-parts.com/cpan/ as a mirror. http://mirrors.cpan.org/cpan-json.txt notes this mirror has a last good date on (Fri Jul 12 16:22:05 2019). MIRRORED.BY itself was last updated (Thu Dec 12 17:30:03 2019). However, http://mirrors.cpan.org/cpan-json.txt was updated just today. http://mirrors-usa.go-parts.com/cpan/ is still in there but is obviously stale.
So, what creates MIRRORED.BY? Is it still running? Should this be a PAUSE issue instead?
Dear all,
today I tried to upgrade the CPAN module of my Perl installation (Perl 5.24.1, Debian stretch, 64 bit). So I did perl -MCPAN -e shell
and issued install CPAN
. Download and make went fine, but the tests failed. In the log, there were multiple messages like the following:
# Can't find any loadable formatter class in Pod::Perldoc::Toterm Pod::Perldoc::Toterm Pod::Perldoc::ToTerm Pod::Perldoc::ToTERM Pod::Simple::term Pod::Simple::term Pod::Simple::Term Pod::Simple::TERM Pod::term Pod::term Pod::Term Pod::TERM Pod::Perldoc::Totext Pod::Perldoc::Totext Pod::Perldoc::ToText Pod::Perldoc::ToTEXT Pod::Simple::text Pod::Simple::text Pod::Simple::Text Pod::Simple::TEXT Pod::text Pod::text Pod::Text Pod::TEXT Pod::Perldoc::ToPod?!
# Aborting
# at -e line 1.
# '
# doesn't match '(?^m:^[ ]+-x)'
# Failed test 'advertizing X'
# at t/97-run.t line 28.
# 'Using logger from Log::Log4perl::Logger
# Hooked into output
# Patched cargo culting
# Options are $VAR1 = {
# 'h' => 1
# };
# Use perldoc to read the documentation
In consequence, the module refused to install. I got around the problem by using fforce install CPAN
, but this is unsatisfactory as it could hide real problems.
Before opening this issue, I have put two hours in researching the problem via Google. There are lots of reports of exactly the same problem, from the past several years. No solution given so far cured the problem in my case.
I have checked that at least some of the modules which are claimed to be missing are actually installed, so this can't be the problem. For example, Pod::Text is definitely installed although the error message says it's not.
I have one Perl installed and didn't change too much on that system yet. It's nearly a Debian stretch stock system. Hence, I do not believe that the issue is related to path settings, wrong library versions or the like; please correct me if I am wrong.
What am I doing wrong?
Thank you very much for the CPAN module!
Regards,
Binarus
There are a few branches in the repository that have been merged in master a long time ago and that could be now deleted.
For example:
git push origin :trunk
git branch -d trunk
(By the way it's unfortunate we can't select branches to copy when we are forking on Github, but that's a GitHub problem, not yours)
I'm transferring and splitting up some issues reported in App::Cpan many problems, multiple fixes.
The sprintf uses %.4f
, so some longer versions are truncated to make it appear that the currently installed and CPAN versions are the same. This is related to #161.
Patch provided by "eponymous alias" [email protected] in the RT ticket
App.Cpan.patch.txt
I am trying to configure cpan
manually after installing perl 5.26.2 with Anaconda :
$ cd /home/hakon/anaconda3/envs/perl_test/bin
$ ./cpan
Loading internal null logger. Install Log::Log4perl for logging messages
Sorry, we have to rerun the configuration dialog for CPAN.pm due to
some missing parameters. Configuration will be written to
<</home/hakon/.cpan/CPAN/MyConfig.pm>>
CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.
Would you like to configure as much as possible automatically? [yes] no
Use of uninitialized value $what in concatenation (.) or string at /home/hakon/anaconda3/envs/perl_test/lib/5.26.2/App/Cpan.pm line 669, <STDIN> line 1.
<install_help>
Warning: You do not have write permission for Perl library directories.
To install modules, you need to configure a local Perl library directory or
escalate your privileges. CPAN can help you by bootstrapping the local::lib
module or by configuring itself to use 'sudo' (if available). You may also
resolve this problem manually if you need to customize your setup.
What approach do you want? (Choose 'local::lib', 'sudo' or 'manual')
[local::lib] manual
The following questions are intended to help you with the
configuration. The CPAN module needs a directory of its own to cache
important index files and maybe keep a temporary mirror of CPAN files.
This may be a site-wide or a personal directory.
I see you already have a directory
/home/hakon/.cpan
Shall we use it as the general CPAN build and cache directory?
<cpan_home>
CPAN build and cache directory? [/home/hakon/.cpan] /home/hakon/anaconda3/envs/perl_test/.cpan
Unless you are accessing the CPAN on your filesystem via a file: URL,
CPAN.pm needs to keep the source files it downloads somewhere. Please
supply a directory where the downloaded files are to be kept.
<keep_source_where>
Download target directory? [/home/hakon/anaconda3/envs/perl_test/.cpan/sources]
<build_dir>
Directory where the build process takes place? [/home/hakon/anaconda3/envs/perl_test/.cpan/build]
Until version 1.88 CPAN.pm never trusted the contents of the build_dir
directory between sessions. Since 1.88_58 CPAN.pm has a YAML-based
mechanism that makes it possible to share the contents of the
build_dir/ directory between different sessions with the same version
of perl. People who prefer to test things several days before
installing will like this feature because it saves a lot of time.
If you say yes to the following question, CPAN will try to store
enough information about the build process so that it can pick up in
future sessions at the same state of affairs as it left a previous
session.
<build_dir_reuse>
Store and re-use state information about distributions between
CPAN.pm sessions? [no]
CPAN.pm can store customized build environments based on regular
expressions for distribution names. These are YAML files where the
default options for CPAN.pm and the environment can be overridden and
dialog sequences can be stored that can later be executed by an
Expect.pm object. The CPAN.pm distribution comes with some prefab YAML
files that cover sample distributions that can be used as blueprints
to store your own prefs. Please check out the distroprefs/ directory of
the CPAN.pm distribution to get a quick start into the prefs system.
<prefs_dir>
Directory where to store default options/environment/dialogs for
building modules that need some customization? [/home/hakon/anaconda3/envs/perl_test/.cpan/prefs]
Normally CPAN.pm keeps config variables in memory and changes need to
be saved in a separate 'o conf commit' command to make them permanent
between sessions. If you set the 'auto_commit' option to true, changes
to a config variable are always automatically committed to disk.
<auto_commit>
Always commit changes to config variables to disk? [no]
CPAN.pm can limit the size of the disk area for keeping the build
directories with all the intermediate files.
<build_cache>
Cache size for build directory (in MB)? [100]
The CPAN indexes are usually rebuilt once or twice per hour, but the
typical CPAN mirror mirrors only once or twice per day. Depending on
the quality of your mirror and your desire to be on the bleeding edge,
you may want to set the following value to more or less than one day
(which is the default). It determines after how many days CPAN.pm
downloads new indexes.
<index_expire>
Let the index expire after how many days? [1]
By default, each time the CPAN module is started, cache scanning is
performed to keep the cache size in sync ('atstart'). Alternatively,
scanning and cleanup can happen when CPAN exits ('atexit'). To prevent
any cache cleanup, answer 'never'.
<scan_cache>
Perform cache scanning ('atstart', 'atexit' or 'never')? [atstart]
Users who install modules and do not intend to look back, can free
occupied disk space quickly by letting CPAN.pm cleanup each build
directory immediately after a successful install.
<cleanup_after_install>
Remove build directory after a successful install? (yes/no)? [no]
To considerably speed up the initial CPAN shell startup, it is
possible to use Storable to create a cache of metadata. If Storable is
not available, the normal index mechanism will be used.
Note: this mechanism is not used when use_sqlite is on and SQLLite is
running.
<cache_metadata>
Cache metadata (yes/no)? [yes]
CPAN::SQLite is a layer between the index files that are downloaded
from the CPAN and CPAN.pm that speeds up metadata queries and reduces
memory consumption of CPAN.pm considerably.
<use_sqlite>
Use CPAN::SQLite if available? (yes/no)? [no]
The CPAN module can detect when a module which you are trying to build
depends on prerequisites. If this happens, it can build the
prerequisites for you automatically ('follow'), ask you for
confirmation ('ask'), or just ignore them ('ignore'). Choosing
'follow' also sets PERL_AUTOINSTALL and PERL_EXTUTILS_AUTOINSTALL for
"--defaultdeps" if not already set.
Please set your policy to one of the three values.
<prerequisites_policy>
Policy on building prerequisites (follow, ask or ignore)? [follow]
When a module declares another one as a 'build_requires' prerequisite
this means that the other module is only needed for building or
testing the module but need not be installed permanently. In this case
you may wish to install that other module nonetheless or just keep it
in the 'build_dir' directory to have it available only temporarily.
Installing saves time on future installations but makes the perl
installation bigger.
You can choose if you want to always install (yes), never install (no)
or be always asked. In the latter case you can set the default answer
for the question to yes (ask/yes) or no (ask/no).
<build_requires_install_policy>
Policy on installing 'build_requires' modules (yes, no, ask/yes,
ask/no)? [yes]
(Experimental feature!) Some CPAN modules recommend additional, optional dependencies. These should
generally be installed except in resource constrained environments. When this
policy is true, recommended modules will be included with required modules.
<recommends_policy>
Included recommended modules? [yes]
(Experimental feature!) Some CPAN modules suggest additional, optional dependencies. These 'suggest'
dependencies provide enhanced operation. When this policy is true, suggested
modules will be included with required modules.
<suggests_policy>
Included suggested modules? [no]
CPAN packages can be digitally signed by authors and thus verified
with the security provided by strong cryptography. The exact mechanism
is defined in the Module::Signature module. While this is generally
considered a good thing, it is not always convenient to the end user
to install modules that are signed incorrectly or where the key of the
author is not available or where some prerequisite for
Module::Signature has a bug and so on.
With the check_sigs parameter you can turn signature checking on and
off. The default is off for now because the whole tool chain for the
functionality is not yet considered mature by some. The author of
CPAN.pm would recommend setting it to true most of the time and
turning it off only if it turns out to be annoying.
Note that if you do not have Module::Signature installed, no signature
checks will be performed at all.
<check_sigs>
Always try to check and verify signatures if a SIGNATURE file is in
the package and Module::Signature is installed (yes/no)? [no]
The goal of the CPAN Testers project (http://testers.cpan.org/) is to
test as many CPAN packages as possible on as many platforms as
possible. This provides valuable feedback to module authors and
potential users to identify bugs or platform compatibility issues and
improves the overall quality and value of CPAN.
One way you can contribute is to send test results for each module
that you install. If you install the CPAN::Reporter module, you have
the option to automatically generate and deliver test reports to CPAN
Testers whenever you run tests on a CPAN package.
See the CPAN::Reporter documentation for additional details and
configuration settings. If your firewall blocks outgoing traffic,
you may need to configure CPAN::Reporter before sending reports.
<test_report>
Generate test reports if CPAN::Reporter is installed (yes/no)? [no]
When a distribution has already been tested by CPAN::Reporter on
this machine, CPAN can skip the test phase and just rely on the
test report history instead.
Note that this will not apply to distributions that failed tests
because of missing dependencies. Also, tests can be run
regardless of the history using "force".
<trust_test_report_history>
Do you want to rely on the test report history (yes/no)? [no]
At the time of this writing (2009-03) there are three YAML
implementations working: YAML, YAML::Syck, and YAML::XS. The latter
two are faster but need a C compiler installed on your system. There
may be more alternative YAML conforming modules. When I tried two
other players, YAML::Tiny and YAML::Perl, they seemed not powerful
enough to work with CPAN.pm. This may have changed in the meantime.
<yaml_module>
Which YAML implementation would you prefer? [YAML]
Warning (maybe harmless): 'YAML' not installed.
Both YAML.pm and YAML::Syck are capable of deserialising code. As this
requires a string eval, which might be a security risk, you can use
this option to enable or disable the deserialisation of code via
CPAN::DeferredCode. (Note: This does not work under perl 5.6)
<yaml_load_code>
Do you want to enable code deserialisation (yes/no)? [no]
The CPAN module will need a few external programs to work properly.
Please correct me, if I guess the wrong path for a program. Don't
panic if you do not have some of them, just press ENTER for those. To
disable the use of a program, you can type a space followed by ENTER.
<make>
Where is your make program? [/bin/make]
<bzip2>
Where is your bzip2 program? [/bin/bzip2]
<gzip>
Where is your gzip program? [/bin/gzip]
<tar>
Where is your tar program? [/bin/tar]
<unzip>
Where is your unzip program? [/bin/unzip]
<gpg>
Where is your gpg program? [/bin/gpg]
<patch>
Where is your patch program? [/bin/patch]
<applypatch>
Where is your applypatch program? [] /bin/applypatch
<wget>
Where is your wget program? [/bin/wget]
<pager>
What is your favorite pager program? [less]
<shell>
What is your favorite shell? [/bin/bash]
Per default all untar operations are done with the perl module
Archive::Tar; by setting this variable to true the external tar
command is used if available; on Unix this is usually preferred
because they have a reliable and fast gnutar implementation.
<prefer_external_tar>
Use the external tar program instead of Archive::Tar? [yes]
When CPAN.pm uses the tar command, which switch for the verbosity
shall be used? Choose 'none' for quiet operation, 'v' for file
name listing, 'vv' for full listing.
<tar_verbosity>
Tar command verbosity level (none or v or vv)? [none]
When CPAN.pm loads a module it needs for some optional feature, it
usually reports about module name and version. Choose 'v' to get this
message, 'none' to suppress it.
<load_module_verbosity>
Verbosity level for loading modules (none or v)? [none]
When CPAN.pm extends @INC via PERL5LIB, it prints a list of
directories added (or a summary of how many directories are
added). Choose 'v' to get this message, 'none' to suppress it.
<perl5lib_verbosity>
Verbosity level for PERL5LIB changes (none or v)? [none]
When the CPAN shell is started it normally displays a greeting message
that contains the running version and the status of readline support.
<inhibit_startup_message>
Do you want to turn this message off? [no]
When you have Module::Build installed and a module comes with both a
Makefile.PL and a Build.PL, which shall have precedence?
The main two standard installer modules are the old and well
established ExtUtils::MakeMaker (for short: EUMM) which uses the
Makefile.PL. And the next generation installer Module::Build (MB)
which works with the Build.PL (and often comes with a Makefile.PL
too). If a module comes only with one of the two we will use that one
but if both are supplied then a decision must be made between EUMM and
MB. See also http://rt.cpan.org/Ticket/Display.html?id=29235 for a
discussion about the right default.
Or, as a third option you can choose RAND which will make a random
decision (something regular CPAN testers will enjoy).
<prefer_installer>
In case you can choose between running a Makefile.PL or a Build.PL,
which installer would you prefer (EUMM or MB or RAND)? [MB]
Every Makefile.PL is run by perl in a separate process. Likewise we
run 'make' and 'make install' in separate processes. If you have
any parameters (e.g. PREFIX, UNINST or the like) you want to
pass to the calls, please specify them here.
If you don't understand this question, just press ENTER.
Typical frequently used settings:
PREFIX=~/perl # non-root users (please see manual for more hints)
<makepl_arg>
Parameters for the 'perl Makefile.PL' command? []
Parameters for the 'make' command? Typical frequently used setting:
-j3 # dual processor system (on GNU make)
<make_arg>
Your choice: [] -j6
Do you want to use a different make command for 'make install'?
Cautious people will probably prefer:
su root -c make
or
sudo make
or
/path1/to/sudo -u admin_account /path2/to/make
<make_install_make_command>
or some such. Your choice: [/bin/make]
Parameters for the 'make install' command?
Typical frequently used setting:
UNINST=1 # to always uninstall potentially conflicting files
# (but do NOT use with local::lib or INSTALL_BASE)
<make_install_arg>
Your choice: [-j6]
A Build.PL is run by perl in a separate process. Likewise we run
'./Build' and './Build install' in separate processes. If you have any
parameters you want to pass to the calls, please specify them here.
Typical frequently used settings:
--install_base /home/xxx # different installation directory
<mbuildpl_arg>
Parameters for the 'perl Build.PL' command? []
Parameters for the './Build' command? Setting might be:
--extra_linker_flags -L/usr/foo/lib # non-standard library location
<mbuild_arg>
Your choice: []
Do you want to use a different command for './Build install'? Sudo
users will probably prefer:
su root -c ./Build
or
sudo ./Build
or
/path1/to/sudo -u admin_account ./Build
<mbuild_install_build_command>
or some such. Your choice: [./Build]
Parameters for the './Build install' command? Typical frequently used
setting:
--uninst 1 # uninstall conflicting files
# (but do NOT use with local::lib or INSTALL_BASE)
<mbuild_install_arg>
Your choice: []
When this is true, CPAN will set PERL_MM_USE_DEFAULT to a true
value. This causes ExtUtils::MakeMaker (and compatible) prompts
to use default values instead of stopping to prompt you to answer
questions. It also sets NONINTERACTIVE_TESTING to a true value to
signal more generally that distributions should not try to
interact with you.
<use_prompt_default>
Do you want to use prompt defaults (yes/no)? [no]
Sometimes you may wish to leave the processes run by CPAN alone
without caring about them. Because the Makefile.PL or the Build.PL
sometimes contains question you're expected to answer, you can set a
timer that will kill a 'perl Makefile.PL' process after the specified
time in seconds.
If you set this value to 0, these processes will wait forever. This is
the default and recommended setting.
<inactivity_timeout>
Timeout for inactivity during {Makefile,Build}.PL? [0]
This timeout prevents CPAN from hanging when trying to parse a
pathologically coded $VERSION from a module.
The default is 15 seconds. If you set this value to 0, no timeout
will occur, but this is not recommended.
<version_timeout>
Timeout for parsing module versions? [15]
Normally, CPAN.pm continues processing the full list of targets and
dependencies, even if one of them fails. However, you can specify
that CPAN should halt after the first failure. (Note that optional
recommended or suggested modules that fail will not cause a halt.)
<halt_on_failure>
Do you want to halt on failure (yes/no)? [no]
If you're accessing the net via proxies, you can specify them in the
CPAN configuration or via environment variables. The variable in
the $CPAN::Config takes precedence.
<ftp_proxy>
Your ftp_proxy? []
<http_proxy>
Your http_proxy? []
<no_proxy>
Your no_proxy? []
<ftp_passive>
Shall we always set the FTP_PASSIVE environment variable when dealing
with ftp download (yes/no)? [yes]
CPAN.pm changes the current working directory often and needs to
determine its own current working directory. Per default it uses
Cwd::cwd but if this doesn't work on your system for some reason,
alternatives can be configured according to the following table:
cwd Cwd::cwd
getcwd Cwd::getcwd
fastcwd Cwd::fastcwd
getdcwd Cwd::getdcwd
backtickcwd external command cwd
<getcwd>
Preferred method for determining the current working directory? [cwd]
The prompt of the cpan shell can contain the current command number
for easier tracking of the session or be a plain string.
<commandnumber_in_prompt>
Do you want the command number in the prompt (yes/no)? [yes]
When using Term::ReadLine, you can turn ornaments on so that your
input stands out against the output from CPAN.pm.
<term_ornaments>
Do you want to turn ornaments on? [yes]
When you have Term::ANSIColor installed, you can turn on colorized
output to have some visual differences between normal CPAN.pm output,
warnings, debugging output, and the output of the modules being
installed. Set your favorite colors after some experimenting with the
Term::ANSIColor module.
Please note that on Windows platforms colorized output also requires
the Win32::Console::ANSI module.
<colorize_output>
Do you want to turn on colored output? [no]
The next option deals with the charset (a.k.a. character set) your
terminal supports. In general, CPAN is English speaking territory, so
the charset does not matter much but some CPAN have names that are
outside the ASCII range. If your terminal supports UTF-8, you should
say no to the next question. If it expects ISO-8859-1 (also known as
LATIN1) then you should say yes. If it supports neither, your answer
does not matter because you will not be able to read the names of some
authors anyway. If you answer no, names will be output in UTF-8.
<term_is_latin>
Your terminal expects ISO-8859-1 (yes/no)? [yes] no
If you have one of the readline packages (Term::ReadLine::Perl,
Term::ReadLine::Gnu, possibly others) installed, the interactive CPAN
shell will have history support. The next two questions deal with the
filename of the history file and with its size. If you do not want to
set this variable, please hit SPACE ENTER to the following question.
If you have one of the readline packages (Term::ReadLine::Perl,
Term::ReadLine::Gnu, possibly others) installed, the interactive CPAN
shell will have history support. The next two questions deal with the
filename of the history file and with its size. If you do not want to
set this variable, please hit SPACE ENTER to the following question.
<histfile>
File to save your history? [/home/hakon/anaconda3/envs/perl_test/.cpan/histfile]
<histsize>
Number of lines to save? [100]
The 'd' and the 'm' command normally only show you information they
have in their in-memory database and thus will never connect to the
internet. If you set the 'show_upload_date' variable to true, 'm' and
'd' will additionally show you the upload date of the module or
distribution. Per default this feature is off because it may require a
net connection to get at the upload date.
<show_upload_date>
Always try to show upload date with 'd' and 'm' command (yes/no)? [no]
During the 'r' command CPAN.pm finds modules without version number.
When the command finishes, it prints a report about this. If you
want this report to be very verbose, say yes to the following
variable.
<show_unparsable_versions>
Show all individual modules that have no $VERSION? [no]
During the 'r' command CPAN.pm finds modules with a version number of
zero. When the command finishes, it prints a report about this. If you
want this report to be very verbose, say yes to the following
variable.
<show_zero_versions>
Show all individual modules that have a $VERSION of zero? [no]
If you have never defined your own C<urllist> in your configuration
then C<CPAN.pm> will be hesitant to use the built in default sites for
downloading. It will ask you once per session if a connection to the
internet is OK and only if you say yes, it will try to connect. But to
avoid this question, you can choose your favorite download sites once
and get away with it. Or, if you have no favorite download sites
answer yes to the following question.
<connect_to_internet_ok>
If no urllist has been chosen yet, would you prefer CPAN.pm to connect
to the built-in default sites without asking? (yes/no)? [yes]
Now you need to choose your CPAN mirror sites. You can let me
pick mirrors for you, you can select them from a list or you
can enter them by hand.
Would you like me to automatically choose some CPAN mirror
sites for you? (This means connecting to the Internet) [yes]
Trying to fetch a mirror list from the Internet
Fetching with HTTP::Tiny:
http://www.perl.org/CPAN/MIRRORED.BY
Looking for CPAN mirrors near you (please be patient)
getaddrinfo(ucu.ac.ug,,AF_INET) failed - No address associated with hostname at /home/hakon/anaconda3/envs/perl_test/lib/5.26.2/CPAN/Mirrors.pm line 564.
Here cpan
aborts, and unfortunately no configuration was saved. Any idea what is going on?
Especially with LetsEncrypt, we should be encouraging mirror operators to serve CPAN content over HTTPS to ensure integrity.
If I attempt:
alceu@yggdrasil:~/Docker$ cpan Bundle::CPAN::Reporter::Smoker::Tests
CPAN: CPAN::SQLite loaded ok (v0.211)
Database was generated on Sun, 03 Jul 2016 16:09:13 GMT
Could not expand [Bundle::CPAN::Reporter::Smoker::Tests]. Check the module name.
I can suggest names if you install one of Text::Levenshtein::XS, Text::Levenshtein::Damerau::XS, Text::Levenshtein, and Text::Levenshtein::Damerau::PP
Skipping Bundle::CPAN::Reporter::Smoker::Tests because I couldn't find a matching namespace.
With the "-i" command line argument:
alceu@yggdrasil:~/Docker$ cpan -i Bundle::CPAN::Reporter::Smoker::Tests
CPAN: CPAN::SQLite loaded ok (v0.211)
Database was generated on Sun, 03 Jul 2016 16:09:13 GMT
Could not expand [Bundle::CPAN::Reporter::Smoker::Tests]. Check the module name.
I can suggest names if you install one of Text::Levenshtein::XS, Text::Levenshtein::Damerau::XS, Text::Levenshtein, and Text::Levenshtein::Damerau::PP
Skipping Bundle::CPAN::Reporter::Smoker::Tests because I couldn't find a matching namespace.
Now, if I attempt inside the CPAN shell:
alceu@yggdrasil:~/Docker$ cpan
cpan shell -- CPAN exploration and modules installation (v2.14)
Enter 'h' for help.
cpan[1]> install Bundle::CPAN::Reporter::Smoker::Tests
Database was generated on Sun, 03 Jul 2016 16:09:13 GMT
Test::Most is up to date (0.34).
Test::MockObject is up to date (1.20150527).
Test::NoWarnings is up to date (1.04).
Test::Output is up to date (1.03).
...
It also fails with Bundle::CPAN as well:
alceu@yggdrasil:~/Docker$ cpan Bundle::CPAN
CPAN: CPAN::SQLite loaded ok (v0.211)
Database was generated on Sun, 03 Jul 2016 16:09:13 GMT
Could not expand [Bundle::CPAN]. Check the module name.
I can suggest names if you install one of Text::Levenshtein::XS, Text::Levenshtein::Damerau::XS, Text::Levenshtein, and Text::Levenshtein::Damerau::PP
Skipping Bundle::CPAN because I couldn't find a matching namespace.
Following the recommended action:
alceu@yggdrasil:~/Docker$ cpan Text::Levenshtein::XS
CPAN: CPAN::SQLite loaded ok (v0.211)
Database was generated on Sun, 03 Jul 2016 16:09:13 GMT
Running install for module 'Text::Levenshtein::XS'
CPAN: LWP::UserAgent loaded ok (v6.15)
Fetching with LWP:
http://192.168.1.103:2963/minicpan/authors/id/U/UG/UGEXE/Text-Levenshtein-XS-0.503.tar.gz
CPAN: YAML::XS loaded ok (v0.62)
CPAN: Digest::SHA loaded ok (v5.95)
Trying again:
alceu@yggdrasil:~/Docker$ cpan Bundle::CPAN
CPAN: CPAN::SQLite loaded ok (v0.211)
Database was generated on Sun, 03 Jul 2016 16:09:13 GMT
Could not expand [Bundle::CPAN]. Check the module name.
No matter how useless 'notest test' is: by chance I tried 'notest test Marpa::R2' today in CPAN master branch at the tag 2.04-TRIAL. That perl had no Config::AutoConf installed. There the endless loop started:
cpan[1]> notest test Marpa::R2
Reading '/home/k/.cpan/Metadata'
Database was generated on Fri, 28 Mar 2014 20:41:02 GMT
Running test for module 'Marpa::R2'
Checksum for /home/ftp/pub/PAUSE/authors/id/J/JK/JKEGL/Marpa-R2-2.082000.tar.gz ok
Scanning cache /home/k/.cpan/build for sizes
....................................................................--------DONE
DEL(1/1): /home/k/.cpan/build/Marpa-R2-2.082000-Mxcwi6
---- Unsatisfied dependencies detected during ----
---- JKEGL/Marpa-R2-2.082000.tar.gz ----
Config::AutoConf [build_requires]
Running test for module 'Config::AutoConf'
Checksum for /home/ftp/pub/PAUSE/authors/id/A/AM/AMBS/Config/Config-AutoConf-0.22.tar.gz ok
Configuring A/AM/AMBS/Config/Config-AutoConf-0.22.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for Config::AutoConf
Writing MYMETA.yml and MYMETA.json
AMBS/Config/Config-AutoConf-0.22.tar.gz
/usr/bin/perl Makefile.PL -- OK
Running make for A/AM/AMBS/Config/Config-AutoConf-0.22.tar.gz
make[1]: Entering directory `/home/k/.cpan/build/Config-AutoConf-0.22-wz0bZf'
cp lib/Config/AutoConf.pm blib/lib/Config/AutoConf.pm
Manifying blib/man3/Config::AutoConf.3pm
make[1]: Leaving directory `/home/k/.cpan/build/Config-AutoConf-0.22-wz0bZf'
AMBS/Config/Config-AutoConf-0.22.tar.gz
/usr/bin/make -- OK
AMBS/Config/Config-AutoConf-0.22.tar.gz
Skipping test because of notest pragma
JKEGL/Marpa-R2-2.082000.tar.gz
Has already been unwrapped into directory /home/k/.cpan/build/Marpa-R2-2.082000-i80t80
---- Unsatisfied dependencies detected during ----
---- JKEGL/Marpa-R2-2.082000.tar.gz ----
Config::AutoConf [build_requires]
Running test for module 'Config::AutoConf'
AMBS/Config/Config-AutoConf-0.22.tar.gz
Has already been unwrapped into directory /home/k/.cpan/build/Config-AutoConf-0.22-wz0bZf
AMBS/Config/Config-AutoConf-0.22.tar.gz
Has already been prepared
AMBS/Config/Config-AutoConf-0.22.tar.gz
Has already been made
AMBS/Config/Config-AutoConf-0.22.tar.gz
Skipping test because of notest pragma
JKEGL/Marpa-R2-2.082000.tar.gz
Has already been unwrapped into directory /home/k/.cpan/build/Marpa-R2-2.082000-i80t80
Bisect decides:
# first bad commit: [f41a54fec57c60f6cdae034c9adee1e7d45c39d4] refactor test shortcut logic
I've often wanted to have a CPAN.pm kill file of things not to install. If CPAN.pm encountered one of these as a requested module or a dependency, it would fail completely and stop the process. So here's a wishlist item. (no github issue labels?)
I mostly wanted one because some customers have local policies that forbid certain things.
But, there are also weird modules like Net::FullAuto that try to make a module installer / uninstaller in their Makefile.PL.
It's easy for cpan(1) to kill modules named on the command line (although that wouldn't kill distros that contain the module), but it's the sneaky dependencies that matter more.
The secondary problem is getting half way through an install and stopping, but CPAN.pm already does that.
If I enter the cpan shell and type "h" for help then one line of the output doesn't fit in an 80-character console window. Everything else fits in, and looks like it is deliberately arranged to do so:
cpan[1]> h
Display Information (ver 2.10)
command argument description
a,b,d,m WORD or /REGEXP/ about authors, bundles, distributions, modules
i WORD or /REGEXP/ about any of the above
ls AUTHOR or GLOB about files in the author's directory
(with WORD being a module, bundle or author name or a distribution
name of the form AUTHOR/DISTRIBUTION)
Download, Test, Make, Install...
get download clean make clean
make make (implies get) look open subshell in dist directory
test make test (implies make) readme display these README files
install make install (implies test) perldoc display POD documentation
Upgrade
r WORDs or /REGEXP/ or NONE report updates for some/matching/all modu
les
upgrade WORDs or /REGEXP/ or NONE upgrade some/matching/all modules
Pragmas
force CMD try hard to do command fforce CMD try harder
notest CMD skip testing
Other
h,? display this menu ! perl-code eval a perl command
o conf [opt] set and query options q quit the cpan shell
reload cpan load CPAN.pm again reload index load newer indices
autobundle Snapshot recent latest CPAN uploads
cpan[2]>
Can the ugly wrapping on the "report updates" line be fixed, or do I just have to make my console window wider?
keve@cygtest ~
$ perl -v
This is perl 5, version 26, subversion 3 (v5.26.3) built for x86_64-cygwin-threads-multi
(with 7 registered patches, see perl -V for more detail)
Copyright 1987-2018, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
keve@cygtest ~
$ curl --version
curl 7.55.1 (Windows) libcurl/7.55.1 WinSSL
Release-Date: [unreleased]
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL
$ cpan
Loading internal null logger. Install Log::Log4perl for logging messages
Sorry, we have to rerun the configuration dialog for CPAN.pm due to
some missing parameters. Configuration will be written to
<</home/Valaki/.cpan/CPAN/MyConfig.pm>>
CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.
Would you like to configure as much as possible automatically? [yes]
Use of uninitialized value $what in concatenation (.) or string at /usr/share/perl5/5.26/App/Cpan.pm line 669, <STDIN> line 1.
<install_help>
Warning: You do not have write permission for Perl library directories.
To install modules, you need to configure a local Perl library directory or
escalate your privileges. CPAN can help you by bootstrapping the local::lib
module or by configuring itself to use 'sudo' (if available). You may also
resolve this problem manually if you need to customize your setup.
What approach do you want? (Choose 'local::lib', 'sudo' or 'manual')
[local::lib]
Press SPACE and ENTER to disable curl
Press SPACE and ENTER to disable curl
Press SPACE and ENTER to disable curl
Press SPACE and ENTER to disable curl
Press SPACE and ENTER to disable curl
Press SPACE and ENTER to disable curl
... and that message keeps repeating in an infinite loop, until I break it with a Ctrl+C.
You must install the Net/curl package via cygwin setup.
The source of confusion is that a different version of curl comes with the most basic cygwin setup, but cpan does not work with that.
keve@cygtest ~
$ curl --version
curl 7.55.1 (Windows) libcurl/7.55.1 WinSSL
Release-Date: [unreleased]
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL
keve@cygtest ~
$ which curl
/cygdrive/c/Windows/system32/curl
And here is what you get once Net/curl is installed.
keve@cygtest ~
$ which curl
/usr/bin/curl
keve@cygtest ~
$ curl --version
curl 7.65.0 (x86_64-pc-cygwin) libcurl/7.65.0 OpenSSL/1.1.1b zlib/1.2.11 brotli/1.0.7 libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.2) libssh/0.8.7/openssl/zlib nghttp2/1.37.0
Release-Date: 2019-05-22
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS brotli Debug GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz Metalink NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP TrackMemory UnixSockets
keve@cygtest ~
$ which -a curl
/usr/bin/curl
/cygdrive/c/Windows/system32/curl
So now you have two different versions of curl available in your cygwin environment, and the one installed via the Net/curl package takes precedence.
Now when you start cpan, you get something like this ...
keve@cygtest ~
$ cpan
Loading internal null logger. Install Log::Log4perl for logging messages
Sorry, we have to rerun the configuration dialog for CPAN.pm due to
some missing parameters. Configuration will be written to
<</home/keve/.cpan/CPAN/MyConfig.pm>>
CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.
Would you like to configure as much as possible automatically? [yes]
Use of uninitialized value $what in concatenation (.) or string at /usr/share/perl5/5.26/App/Cpan.pm line 669, <STDIN> line 1.
<install_help>
Warning: You do not have write permission for Perl library directories.
To install modules, you need to configure a local Perl library directory or
escalate your privileges. CPAN can help you by bootstrapping the local::lib
module or by configuring itself to use 'sudo' (if available). You may also
resolve this problem manually if you need to customize your setup.
What approach do you want? (Choose 'local::lib', 'sudo' or 'manual')
[local::lib]
Autoconfiguration complete.
Attempting to bootstrap local::lib...
Writing /home/keve/.cpan/CPAN/MyConfig.pm for bootstrap...
commit: wrote '/home/keve/.cpan/CPAN/MyConfig.pm'
Fetching with HTTP::Tiny:
http://www.cpan.org/authors/01mailrc.txt.gz
Reading '/home/keve/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with HTTP::Tiny:
http://www.cpan.org/modules/02packages.details.txt.gz
Reading '/home/keve/.cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Sat, 01 Jun 2019 09:17:02 GMT
HTTP::Date not available
.............
New CPAN.pm version (v2.26) available.
[Currently running version is v2.18]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
...............................................................DONE
Fetching with HTTP::Tiny:
http://www.cpan.org/modules/03modlist.data.gz
Reading '/home/keve/.cpan/sources/modules/03modlist.data.gz'
DONE
Writing /home/keve/.cpan/Metadata
Fetching with HTTP::Tiny:
http://www.cpan.org/authors/id/H/HA/HAARG/local-lib-2.000024.tar.gz
Fetching with HTTP::Tiny:
http://www.cpan.org/authors/id/H/HA/HAARG/CHECKSUMS
Checksum for /home/keve/.cpan/sources/authors/id/H/HA/HAARG/local-lib-2.000024.tar.gz ok
'YAML' not installed, will not store persistent state
Configuring H/HA/HAARG/local-lib-2.000024.tar.gz with Makefile.PL
Attempting to create directory /home/keve/perl5
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for local::lib
Writing MYMETA.yml and MYMETA.json
HAARG/local-lib-2.000024.tar.gz
/usr/bin/perl Makefile.PL --bootstrap -- OK
Running make for H/HA/HAARG/local-lib-2.000024.tar.gz
cp lib/local/lib.pm blib/lib/local/lib.pm
cp lib/POD2/PT_BR/local/lib.pod blib/lib/POD2/PT_BR/local/lib.pod
cp lib/POD2/DE/local/lib.pod blib/lib/POD2/DE/local/lib.pod
cp lib/lib/core/only.pm blib/lib/lib/core/only.pm
Manifying 4 pod documents
HAARG/local-lib-2.000024.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 "/usr/bin/perl.exe" "-I/home/keve/perl5/lib/perl5" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/bad_variables.t ...... ok
t/carp-mismatch.t ...... ok
t/classmethod.t ........ ok
t/de-dup.t ............. ok
t/lib-core-only.t ...... ok
t/pipeline.t ........... ok
t/shell.t .............. ok
t/stackable.t .......... ok
t/subroutine-in-inc.t .. ok
t/taint-mode.t ......... ok
All tests successful.
Files=10, Tests=172, 29 wallclock secs ( 0.03 usr 0.17 sys + 4.24 cusr 11.30 csys = 15.74 CPU)
Result: PASS
HAARG/local-lib-2.000024.tar.gz
/usr/bin/make test -- OK
Running make install
Manifying 4 pod documents
Installing /home/keve/perl5/lib/perl5/lib/core/only.pm
Installing /home/keve/perl5/lib/perl5/local/lib.pm
Installing /home/keve/perl5/lib/perl5/POD2/DE/local/lib.pod
Installing /home/keve/perl5/lib/perl5/POD2/PT_BR/local/lib.pod
Installing /home/keve/perl5/man/man3/lib.core.only.3pm
Installing /home/keve/perl5/man/man3/local.lib.3pm
Installing /home/keve/perl5/man/man3/POD2.DE.local.lib.3pm
Installing /home/keve/perl5/man/man3/POD2.PT_BR.local.lib.3pm
Appending installation info to /home/keve/perl5/lib/perl5/x86_64-cygwin-threads-multi/perllocal.pod
HAARG/local-lib-2.000024.tar.gz
/usr/bin/make install -- OK
local::lib is installed. You must now add the following environment variables
to your shell configuration files (or registry, if you are on Windows) and
then restart your command line shell and CPAN before installing modules:
PATH="/home/keve/perl5/bin${PATH:+:${PATH}}"; export PATH;
PERL5LIB="/home/keve/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/home/keve/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/home/keve/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/home/keve/perl5"; export PERL_MM_OPT;
Would you like me to append that to /home/keve/.bashrc now? [yes]
commit: wrote '/home/keve/.cpan/CPAN/MyConfig.pm'
You can re-run configuration any time with 'o conf init' in the CPAN shell
Terminal does not support AddHistory.
cpan shell -- CPAN exploration and modules installation (v2.18)
Enter 'h' for help.
cpan[1]>
I was told the "Use of uninitialized value $what in concatenation (.) or string at /usr/share/perl5/5.26/App/Cpan.pm line 669" warning is harmless and can be safely ignored. You can upgrade cpan itself via cpan CPAN
, and that warning will no longer show up.
Alternatively you can change line 669 of CPAN.pm from $scalar .= $what;
to $scalar .= ($what // '');
.
Other than the above, for cpan to work properly under cygwin64, make sure you have at least the below packages installed.
The tag 1.9800 is missing in this Github repo. May be it's just a missing "git push --tags"...
Hi @andk ! Sorry to open another issue here, but my email reply to your email bounced again and it is hard for me to have a one sided conversation like that. Anyway, if the link to the issue tracker on one of my CPAN dists or other projects is wrong, you can report it on https://github.com/shlomif/shlomi-fish-homepage or any other github/etc. project of mine, or alternatively see http://www.shlomifish.org/me/contact-me/ .
Feel free to close this issue.
It may also not be setting up the current environment correctly.
I think this was due to big internals changes in local::lib, but I can't figure out why what we're doing isn't working.
Maybe @haarg can enlighten us.
An offhanded comment somewhere else gave me a distroprefs file and i was looking with no previous for knowledge for how to install the file and skimmed all the chapters below the first one mentioning it, before realizing that the Filenames chapter explains that. Please split that out and give it a better title.
If I run "install MIME::Entity" on a clean perl-5.20.2 with CPAN.pm upgraded to v2.10 then on my system it fails because somewhere in the prerequisites is Test::Deep, which depends on Test::NoWarnings, which fails tests because it uses fork(), which my system doesn't have. [I logged that problem in CPAN RT#77352, but have received no response.]
I thought the fix would be simple: just "force install Test::NoWarnings" and then re-run "install MIME::Entity" and this time all should be well.
Unfortunately, it doesn't work because the second attempt at running "install MIME::Entity" doesn't seem to recheck prerequisites: It just says that the package has "already been unwrapped" and dives straight into running the tests, which fails because Test::Deep is still missing.
I have a complete log of the output if that helps anyone to figure out where it goes wrong.
If I exit the cpan shell and immediately re-enter it and then type "install MIME::Entity" again then it works correctly, installing Test::Deep first and sorting out any other still-missing prerequisites before trying MIME::Entity again.
I would like it to do that without me having to exit and re-enter the cpan shell.
I get:
Press SPACE and ENTER to disable patch
Press SPACE and ENTER to disable patch
Press SPACE and ENTER to disable patch
Press SPACE and ENTER to disable patch
The executable it finds is:
/cygdrive/c/Strawberry/c/bin/patch
$ patch --version
patch 2.5.9
[...]
I can workaround this locally by installing cygwin's patch package.
/usr/bin/patch
$ patch --version
GNU patch 2.7.4
[...]
However i think the first time setup should recognize that the patch it found is not the one it needs, whether this happens due to matching the version string, or by rejecting any patch that is in /cygdrive.
Freshly perlbrewed perl 5.18.1
, stock bundled CPAN.pm 2.0
, build_requires_install_policy
set to no
.
rabbit@Thesaurus:~$ tree perl5/perlbrew/perls/5.18.1/lib/site_perl/
perl5/perlbrew/perls/5.18.1/lib/site_perl/
└── 5.18.1
└── x86_64-linux-thread-multi
2 directories, 0 files
A mere cpan Package::Stash
executed as the first command on this new perl fails due to a missing Module::Implementation
. Particularly ominous is the line make: *** No targets specified and no makefile found. Stop.
even though there is nothing special about M::I's Makefile.PL
: https://metacpan.org/source/DROLSKY/Module-Implementation-0.07/Makefile.PL
This could be related (but does not seem to be exactly the same as) https://rt.cpan.org/Ticket/Display.html?id=87474
Full log follows:
rabbit@Thesaurus:~$ cpan Package::Stash
Reading '/home/rabbit/.cpan/Metadata'
Database was generated on Sun, 06 Oct 2013 08:08:54 GMT
Running install for module 'Package::Stash'
Running make for D/DO/DOY/Package-Stash-0.36.tar.gz
Checksum for /home/rabbit/.cpan/sources/authors/id/D/DO/DOY/Package-Stash-0.36.tar.gz ok
---- Unsatisfied dependencies detected during ----
---- DOY/Package-Stash-0.36.tar.gz ----
Dist::CheckConflicts [build_requires]
Running make test
Make had some problems, won't test
Delayed until after prerequisites
Running make install
Make had some problems, won't install
Delayed until after prerequisites
Running install for module 'Dist::CheckConflicts'
Running make for D/DO/DOY/Dist-CheckConflicts-0.09.tar.gz
Checksum for /home/rabbit/.cpan/sources/authors/id/D/DO/DOY/Dist-CheckConflicts-0.09.tar.gz ok
CPAN.pm: Building D/DO/DOY/Dist-CheckConflicts-0.09.tar.gz
Checking if your kit is complete...
Looks good
Warning: prerequisite List::MoreUtils 0.12 not found.
Warning: prerequisite Module::Runtime 0 not found.
Writing Makefile for Dist::CheckConflicts
Writing MYMETA.yml and MYMETA.json
---- Unsatisfied dependencies detected during ----
---- DOY/Dist-CheckConflicts-0.09.tar.gz ----
List::MoreUtils [requires]
Module::Runtime [requires]
Test::Fatal [build_requires]
Running make test
Delayed until after prerequisites
Running make install
Delayed until after prerequisites
Running install for module 'List::MoreUtils'
Running make for A/AD/ADAMK/List-MoreUtils-0.33.tar.gz
Checksum for /home/rabbit/.cpan/sources/authors/id/A/AD/ADAMK/List-MoreUtils-0.33.tar.gz ok
CPAN.pm: Building A/AD/ADAMK/List-MoreUtils-0.33.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for List::MoreUtils
Writing MYMETA.yml and MYMETA.json
cp lib/List/MoreUtils.pm blib/lib/List/MoreUtils.pm
/home/rabbit/perl5/perlbrew/perls/5.18.1/bin/perl /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/ExtUtils/xsubpp -typemap /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/ExtUtils/typemap MoreUtils.xs > MoreUtils.xsc && mv MoreUtils.xsc MoreUtils.c
cc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.33\" -DXS_VERSION=\"0.33\" -fPIC "-I/home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/x86_64-linux-thread-multi/CORE" -DPERL_EXT MoreUtils.c
Running Mkbootstrap for List::MoreUtils ()
chmod 644 MoreUtils.bs
rm -f blib/arch/auto/List/MoreUtils/MoreUtils.so
cc -shared -O2 -L/usr/local/lib -fstack-protector MoreUtils.o -o blib/arch/auto/List/MoreUtils/MoreUtils.so \
\
chmod 755 blib/arch/auto/List/MoreUtils/MoreUtils.so
cp MoreUtils.bs blib/arch/auto/List/MoreUtils/MoreUtils.bs
chmod 644 blib/arch/auto/List/MoreUtils/MoreUtils.bs
Manifying blib/man3/List::MoreUtils.3
ADAMK/List-MoreUtils-0.33.tar.gz
/usr/bin/make -- OK
'YAML' not installed, will not store persistent state
Running make test
PERL_DL_NONLAZY=1 /home/rabbit/perl5/perlbrew/perls/5.18.1/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01_compile.t .. ok
t/02_perl.t ..... ok
t/03_xs.t ....... ok
All tests successful.
Files=3, Tests=370, 1 wallclock secs ( 0.08 usr 0.02 sys + 0.42 cusr 0.02 csys = 0.54 CPU)
Result: PASS
ADAMK/List-MoreUtils-0.33.tar.gz
/usr/bin/make test -- OK
Running make install
Not installing because is only 'build_requires'
Running install for module 'Module::Runtime'
Running make for Z/ZE/ZEFRAM/Module-Runtime-0.013.tar.gz
Checksum for /home/rabbit/.cpan/sources/authors/id/Z/ZE/ZEFRAM/Module-Runtime-0.013.tar.gz ok
CPAN.pm: Building Z/ZE/ZEFRAM/Module-Runtime-0.013.tar.gz
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Module-Runtime' version '0.013'
Building Module-Runtime
ZEFRAM/Module-Runtime-0.013.tar.gz
./Build -- OK
Running Build test
t/cmn.t ........... ok
t/dependency.t .... ok
t/import_error.t .. ok
t/ivmn.t .......... ok
t/ivms.t .......... ok
t/mnf.t ........... ok
t/pod_cvg.t ....... skipped: Test::Pod::Coverage not available
t/pod_syn.t ....... skipped: Test::Pod not available
t/rm.t ............ ok
t/taint.t ......... ok
t/um.t ............ ok
t/upo.t ........... ok
All tests successful.
Files=12, Tests=303, 1 wallclock secs ( 0.08 usr 0.02 sys + 0.38 cusr 0.04 csys = 0.52 CPU)
Result: PASS
ZEFRAM/Module-Runtime-0.013.tar.gz
./Build test -- OK
Running Build install
Not installing because is only 'build_requires'
Running install for module 'Test::Fatal'
Running make for R/RJ/RJBS/Test-Fatal-0.013.tar.gz
Checksum for /home/rabbit/.cpan/sources/authors/id/R/RJ/RJBS/Test-Fatal-0.013.tar.gz ok
CPAN.pm: Building R/RJ/RJBS/Test-Fatal-0.013.tar.gz
Checking if your kit is complete...
Looks good
Warning: prerequisite Try::Tiny 0.07 not found.
Writing Makefile for Test::Fatal
Writing MYMETA.yml and MYMETA.json
---- Unsatisfied dependencies detected during ----
---- RJBS/Test-Fatal-0.013.tar.gz ----
Try::Tiny [requires]
Running make test
Delayed until after prerequisites
Running make install
Delayed until after prerequisites
Running install for module 'Try::Tiny'
Running make for D/DO/DOY/Try-Tiny-0.18.tar.gz
Checksum for /home/rabbit/.cpan/sources/authors/id/D/DO/DOY/Try-Tiny-0.18.tar.gz ok
CPAN.pm: Building D/DO/DOY/Try-Tiny-0.18.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for Try::Tiny
Writing MYMETA.yml and MYMETA.json
cp lib/Try/Tiny.pm blib/lib/Try/Tiny.pm
Manifying blib/man3/Try::Tiny.3
DOY/Try-Tiny-0.18.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /home/rabbit/perl5/perlbrew/perls/5.18.1/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-compile.t ................. ok
t/basic.t ...................... ok
t/context.t .................... ok
t/erroneous_usage.t ............ ok
t/finally.t .................... ok
t/given_when.t ................. ok
t/global_destruction_forked.t .. ok
t/named.t ...................... skipped: Sub::Name required
t/when.t ....................... ok
All tests successful.
Files=9, Tests=96, 1 wallclock secs ( 0.06 usr 0.00 sys + 0.30 cusr 0.02 csys = 0.38 CPU)
Result: PASS
DOY/Try-Tiny-0.18.tar.gz
/usr/bin/make test -- OK
Running make install
Not installing because is only 'build_requires'
Running make for R/RJ/RJBS/Test-Fatal-0.013.tar.gz
Has already been unwrapped into directory /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc
CPAN.pm: Building R/RJ/RJBS/Test-Fatal-0.013.tar.gz
cp lib/Test/Fatal.pm blib/lib/Test/Fatal.pm
Manifying blib/man3/Test::Fatal.3
RJBS/Test-Fatal-0.013.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /home/rabbit/perl5/perlbrew/perls/5.18.1/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-compile.t ................ ok
t/000-report-versions-tiny.t .. #
#
# Generated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.09
# perl: 5.018001 (wanted any version) on linux from /home/rabbit/perl5/perlbrew/perls/5.18.1/bin/perl
#
# Carp => 1.29 (want any version)
# Exporter => 5.68 (want 5.57)
# ExtUtils::MakeMaker => 6.66 (want 6.30)
# File::Spec => 3.40 (want any version)
# IO::Handle => 1.34 (want any version)
# IPC::Open3 => 1.13 (want any version)
# Test::Builder => 0.98 (want any version)
# Test::Builder::Tester => 1.22 (want any version)
# Test::More => 0.98 (want 0.96)
# Test::Pod => module not found. (want 1.41)
# Try::Tiny => 0.18 (want 0.07)
# overload => 1.22 (want any version)
# strict => 1.07 (want any version)
# version => 0.9902 (want 0.9901)
# warnings => 1.18 (want any version)
#
# Thanks for using my code. I hope it works for you.
# If not, please try and include this output in the bug report.
# That will help me reproduce the issue and solve your problem.
#
t/000-report-versions-tiny.t .. ok
t/basic.t ..................... ok
t/like-exception.t ............ ok
t/todo.t ...................... ok
All tests successful.
Files=5, Tests=17, 1 wallclock secs ( 0.04 usr 0.00 sys + 0.28 cusr 0.02 csys = 0.34 CPU)
Result: PASS
RJBS/Test-Fatal-0.013.tar.gz
/usr/bin/make test -- OK
Running make install
Not installing because is only 'build_requires'
Running make for D/DO/DOY/Dist-CheckConflicts-0.09.tar.gz
Has already been unwrapped into directory /home/rabbit/.cpan/build/Dist-CheckConflicts-0.09-OLBvZ9
CPAN.pm: Building D/DO/DOY/Dist-CheckConflicts-0.09.tar.gz
cp lib/Dist/CheckConflicts.pm blib/lib/Dist/CheckConflicts.pm
Manifying blib/man3/Dist::CheckConflicts.3
DOY/Dist-CheckConflicts-0.09.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /home/rabbit/perl5/perlbrew/perls/5.18.1/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-compile.t .. ok
t/also.t ........ ok
t/basic.t ....... ok
t/conflicts.t ... ok
t/dist.t ........ ok
t/merge.t ....... ok
t/runtime.t ..... ok
t/warn.t ........ ok
All tests successful.
Files=8, Tests=57, 1 wallclock secs ( 0.06 usr 0.00 sys + 0.34 cusr 0.04 csys = 0.44 CPU)
Result: PASS
DOY/Dist-CheckConflicts-0.09.tar.gz
/usr/bin/make test -- OK
Running make install
Not installing because is only 'build_requires'
Running make for D/DO/DOY/Package-Stash-0.36.tar.gz
CPAN.pm: Building D/DO/DOY/Package-Stash-0.36.tar.gz
Checking if your kit is complete...
Looks good
Warning: prerequisite Module::Implementation 0.06 not found.
Warning: prerequisite Package::Stash::XS 0.26 not found.
Warning: prerequisite Test::Requires 0 not found.
Writing Makefile for Package::Stash
Writing MYMETA.yml and MYMETA.json
Running make for D/DO/DOY/Dist-CheckConflicts-0.09.tar.gz
Has already been unwrapped into directory /home/rabbit/.cpan/build/Dist-CheckConflicts-0.09-OLBvZ9
Running make for A/AD/ADAMK/List-MoreUtils-0.33.tar.gz
Has already been unwrapped into directory /home/rabbit/.cpan/build/List-MoreUtils-0.33-WiylFZ
Has already been made
Running make test
Has already been tested successfully
Running make install
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/x86_64-linux-thread-multi/auto/List/MoreUtils/MoreUtils.so
Installing /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/x86_64-linux-thread-multi/auto/List/MoreUtils/MoreUtils.bs
Installing /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/x86_64-linux-thread-multi/List/MoreUtils.pm
Installing /home/rabbit/perl5/perlbrew/perls/5.18.1/man/man3/List::MoreUtils.3
Appending installation info to /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/x86_64-linux-thread-multi/perllocal.pod
ADAMK/List-MoreUtils-0.33.tar.gz
/usr/bin/make install -- OK
Has already been made
Running make test
Has already been tested successfully
Running make install
Installing /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/Dist/CheckConflicts.pm
Installing /home/rabbit/perl5/perlbrew/perls/5.18.1/man/man3/Dist::CheckConflicts.3
Appending installation info to /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/x86_64-linux-thread-multi/perllocal.pod
DOY/Dist-CheckConflicts-0.09.tar.gz
/usr/bin/make install -- OK
---- Unsatisfied dependencies detected during ----
---- DOY/Package-Stash-0.36.tar.gz ----
Package::Stash::XS [requires]
Test::Requires [build_requires]
Module::Implementation [requires]
Running make test
Delayed until after prerequisites
Running make install
Delayed until after prerequisites
Running install for module 'Package::Stash::XS'
Running make for D/DO/DOY/Package-Stash-XS-0.28.tar.gz
Checksum for /home/rabbit/.cpan/sources/authors/id/D/DO/DOY/Package-Stash-XS-0.28.tar.gz ok
CPAN.pm: Building D/DO/DOY/Package-Stash-XS-0.28.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for Package::Stash::XS
Writing MYMETA.yml and MYMETA.json
---- Unsatisfied dependencies detected during ----
---- DOY/Package-Stash-XS-0.28.tar.gz ----
Test::Requires [build_requires]
Running make test
Delayed until after prerequisites
Running make install
Delayed until after prerequisites
Running install for module 'Test::Requires'
Running make for T/TO/TOKUHIROM/Test-Requires-0.07.tar.gz
Checksum for /home/rabbit/.cpan/sources/authors/id/T/TO/TOKUHIROM/Test-Requires-0.07.tar.gz ok
CPAN.pm: Building T/TO/TOKUHIROM/Test-Requires-0.07.tar.gz
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Test-Requires' version '0.07'
Merging cpanfile prereqs to MYMETA.yml
Merging cpanfile prereqs to MYMETA.json
Building Test-Requires
TOKUHIROM/Test-Requires-0.07.tar.gz
./Build -- OK
Running Build test
t/00_compile.t ......... 1/1 # Test::More: 0.98
t/00_compile.t ......... ok
t/01_simple.t .......... ok
t/02_no_plan.t ......... ok
t/03_import_hashref.t .. skipped: Test requires module 'Acme::Unknown::Missing::Module::Name' but it's not found
t/04_import_array.t .... skipped: Test requires module 'Acme::Unknown::Missing::Module::Name' but it's not found
t/05_success.t ......... ok
t/06_perlver.t ......... ok
All tests successful.
Files=7, Tests=15, 0 wallclock secs ( 0.06 usr 0.02 sys + 0.16 cusr 0.04 csys = 0.28 CPU)
Result: PASS
TOKUHIROM/Test-Requires-0.07.tar.gz
./Build test -- OK
Running Build install
Not installing because is only 'build_requires'
Running make for D/DO/DOY/Package-Stash-XS-0.28.tar.gz
Has already been unwrapped into directory /home/rabbit/.cpan/build/Package-Stash-XS-0.28-PNu9RY
CPAN.pm: Building D/DO/DOY/Package-Stash-XS-0.28.tar.gz
cp lib/Package/Stash/XS.pm blib/lib/Package/Stash/XS.pm
/home/rabbit/perl5/perlbrew/perls/5.18.1/bin/perl /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/ExtUtils/xsubpp -typemap /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/ExtUtils/typemap -typemap typemap XS.xs > XS.xsc && mv XS.xsc XS.c
cc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.28\" -DXS_VERSION=\"0.28\" -fPIC "-I/home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/x86_64-linux-thread-multi/CORE" XS.c
Running Mkbootstrap for Package::Stash::XS ()
chmod 644 XS.bs
rm -f blib/arch/auto/Package/Stash/XS/XS.so
cc -shared -O2 -L/usr/local/lib -fstack-protector XS.o -o blib/arch/auto/Package/Stash/XS/XS.so \
\
chmod 755 blib/arch/auto/Package/Stash/XS/XS.so
cp XS.bs blib/arch/auto/Package/Stash/XS/XS.bs
chmod 644 blib/arch/auto/Package/Stash/XS/XS.bs
Manifying blib/man3/Package::Stash::XS.3
DOY/Package-Stash-XS-0.28.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /home/rabbit/perl5/perlbrew/perls/5.18.1/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-compile.t ........... ok
t/addsub.t ............... ok
t/anon-basic.t ........... skipped: Test requires module 'Package::Anon' but it's not found
t/anon.t ................. skipped: Test requires module 'Package::Anon' but it's not found
t/bare-anon-basic.t ...... skipped: This isn't really going to work yet, probably
t/bare-anon.t ............ skipped: This isn't really going to work yet, probably
t/basic.t ................ ok
t/compile-time.t ......... ok
t/edge-cases.t ........... ok
t/extension.t ............ ok
t/get.t .................. ok
t/io.t ................... ok
t/isa.t .................. ok
t/magic.t ................ ok
t/paamayim_nekdotayim.t .. ok
t/scalar-values.t ........ ok
t/stash-deletion.t ....... ok
t/synopsis.t ............. ok
t/warnings.t ............. ok
All tests successful.
Files=19, Tests=266, 1 wallclock secs ( 0.10 usr 0.04 sys + 0.62 cusr 0.14 csys = 0.90 CPU)
Result: PASS
DOY/Package-Stash-XS-0.28.tar.gz
/usr/bin/make test -- OK
Running make install
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/x86_64-linux-thread-multi/auto/Package/Stash/XS/XS.bs
Installing /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/x86_64-linux-thread-multi/auto/Package/Stash/XS/XS.so
Installing /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/x86_64-linux-thread-multi/Package/Stash/XS.pm
Installing /home/rabbit/perl5/perlbrew/perls/5.18.1/man/man3/Package::Stash::XS.3
Appending installation info to /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/x86_64-linux-thread-multi/perllocal.pod
DOY/Package-Stash-XS-0.28.tar.gz
/usr/bin/make install -- OK
Running install for module 'Test::Requires'
Running Build for T/TO/TOKUHIROM/Test-Requires-0.07.tar.gz
Has already been unwrapped into directory /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B
Has already been made
Running Build test
Has already been tested successfully
Running Build install
NO -- is only 'build_requires'
Running install for module 'Module::Implementation'
Running make for D/DR/DROLSKY/Module-Implementation-0.07.tar.gz
Checksum for /home/rabbit/.cpan/sources/authors/id/D/DR/DROLSKY/Module-Implementation-0.07.tar.gz ok
CPAN.pm: Building D/DR/DROLSKY/Module-Implementation-0.07.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for Module::Implementation
Writing MYMETA.yml and MYMETA.json
Running Build for Z/ZE/ZEFRAM/Module-Runtime-0.013.tar.gz
Has already been unwrapped into directory /home/rabbit/.cpan/build/Module-Runtime-0.013-5oFXut
Has already been made
Running Build test
Has already been tested successfully
Running Build install
Building Module-Runtime
Installing /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/Module/Runtime.pm
Installing /home/rabbit/perl5/perlbrew/perls/5.18.1/man/man3/Module::Runtime.3
ZEFRAM/Module-Runtime-0.013.tar.gz
./Build install -- OK
make: *** No targets specified and no makefile found. Stop.
DROLSKY/Module-Implementation-0.07.tar.gz
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Running make for D/DO/DOY/Package-Stash-0.36.tar.gz
Has already been unwrapped into directory /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_
CPAN.pm: Building D/DO/DOY/Package-Stash-0.36.tar.gz
Warning: Prerequisite 'Module::Implementation => 0.06' for 'DOY/Package-Stash-0.36.tar.gz' failed when processing 'DROLSKY/Module-Implementation-0.07.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
cp lib/Package/Stash.pm blib/lib/Package/Stash.pm
cp lib/Package/Stash/PP.pm blib/lib/Package/Stash/PP.pm
cp lib/Package/Stash/Conflicts.pm blib/lib/Package/Stash/Conflicts.pm
cp bin/package-stash-conflicts blib/script/package-stash-conflicts
/home/rabbit/perl5/perlbrew/perls/5.18.1/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/package-stash-conflicts
Manifying blib/man1/package-stash-conflicts.1
Manifying blib/man3/Package::Stash::PP.3
Manifying blib/man3/Package::Stash.3
Manifying blib/man3/Package::Stash::Conflicts.3
DOY/Package-Stash-0.36.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /home/rabbit/perl5/perlbrew/perls/5.18.1/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/impl-selection/*.t
t/00-compile.t ................... Can't locate Module/Implementation.pm in @INC (you may need to install the Module::Implementation module) (@INC contains: lib /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1 /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1 .) at lib/Package/Stash.pm line 15.
BEGIN failed--compilation aborted at lib/Package/Stash.pm line 15.
Compilation failed in require at -e line 1.
t/00-compile.t ................... 1/4
# Failed test 'Package::Stash loaded ok'
# at t/00-compile.t line 62.
# ''
# doesn't match '(?^s:^\s*Package::Stash ok)'
# Looks like you failed 1 test of 4.
t/00-compile.t ................... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests
(less 1 skipped subtest: 2 okay)
t/addsub.t ....................... Can't locate object method "new" via package "Package::Stash" at t/addsub.t line 12.
t/addsub.t ....................... Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
t/anon-basic.t ................... skipped: Test requires module 'Package::Anon' but it's not found
t/anon.t ......................... skipped: Test requires module 'Package::Anon' but it's not found
t/bare-anon-basic.t .............. skipped: This isn't really going to work yet, probably
t/bare-anon.t .................... skipped: This isn't really going to work yet, probably
t/basic.t ........................ Can't locate object method "new" via package "Package::Stash" at t/basic.t line 317.
BEGIN failed--compilation aborted at t/basic.t line 317.
t/basic.t ........................ Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
t/compile-time.t ................. 1/?
# Failed test 'use CompileTime;'
# at t/compile-time.t line 7.
# Tried to use 'CompileTime'.
# Error: Can't locate object method "new" via package "Package::Stash" at t/lib/CompileTime.pm line 10.
# BEGIN failed--compilation aborted at t/lib/CompileTime.pm line 13.
# Compilation failed in require at (eval 4) line 2.
# BEGIN failed--compilation aborted at (eval 4) line 2.
# Looks like you failed 1 test of 1.
t/compile-time.t ................. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
t/edge-cases.t ................... Can't locate object method "new" via package "Package::Stash" at t/edge-cases.t line 28.
t/edge-cases.t ................... Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
t/extension.t .................... Can't locate object method "new" via package "My::Package::Stash" at t/extension.t line 19.
t/extension.t .................... Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
t/get.t .......................... Can't locate object method "new" via package "Package::Stash" at t/get.t line 12.
BEGIN failed--compilation aborted at t/get.t line 15.
t/get.t .......................... Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
t/impl-selection/basic-pp.t ...... Can't locate Module/Implementation.pm in @INC (you may need to install the Module::Implementation module) (@INC contains: /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1 /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1 .) at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
BEGIN failed--compilation aborted at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
Compilation failed in require at t/impl-selection/basic-pp.t line 9.
BEGIN failed--compilation aborted at t/impl-selection/basic-pp.t line 9.
t/impl-selection/basic-pp.t ...... Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
t/impl-selection/basic-xs.t ...... Can't locate Module/Implementation.pm in @INC (you may need to install the Module::Implementation module) (@INC contains: /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1 /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1 .) at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
BEGIN failed--compilation aborted at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
Compilation failed in require at t/impl-selection/basic-xs.t line 10.
BEGIN failed--compilation aborted at t/impl-selection/basic-xs.t line 10.
t/impl-selection/basic-xs.t ...... Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
t/impl-selection/bug-rt-78272.t .. 1/?
# Failed test 'Arbitrary code in $ENV throws exception'
# at t/impl-selection/bug-rt-78272.t line 12.
# 'Can't locate Module/Implementation.pm in @INC (you may need to install the Module::Implementation module) (@INC contains: /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1 /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1 .) at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
# BEGIN failed--compilation aborted at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
# Compilation failed in require at t/impl-selection/bug-rt-78272.t line 11.
# '
# doesn't match '(?^:PP; exit 1 is not a valid implementation for Package::Stash)'
# Failed test 'Sanity check: forcing package reload throws the exception again'
# at t/impl-selection/bug-rt-78272.t line 21.
# 'Can't locate Module/Implementation.pm in @INC (you may need to install the Module::Implementation module) (@INC contains: /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1 /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1 .) at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
# BEGIN failed--compilation aborted at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
# Compilation failed in require at t/impl-selection/bug-rt-78272.t line 19.
# '
# doesn't match '(?^:PP; exit 1 is not a valid implementation for Package::Stash)'
# Failed test 'Valid $ENV value loads correctly'
# at t/impl-selection/bug-rt-78272.t line 36.
# got: 'Can't locate Module/Implementation.pm in @INC (you may need to install the Module::Implementation module) (@INC contains: /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1 /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1 .) at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
# BEGIN failed--compilation aborted at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
# Compilation failed in require at t/impl-selection/bug-rt-78272.t line 29.
# '
# expected: undef
# Looks like you failed 3 tests of 3.
t/impl-selection/bug-rt-78272.t .. Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/3 subtests
t/impl-selection/choice.t ........ Can't locate Module/Implementation.pm in @INC (you may need to install the Module::Implementation module) (@INC contains: /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1 /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1 .) at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
BEGIN failed--compilation aborted at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
Compilation failed in require at t/impl-selection/choice.t line 8.
t/impl-selection/choice.t ........ Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
t/impl-selection/env.t ........... Can't locate Module/Implementation.pm in @INC (you may need to install the Module::Implementation module) (@INC contains: /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1 /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1 .) at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
BEGIN failed--compilation aborted at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
Compilation failed in require at t/impl-selection/env.t line 12.
t/impl-selection/env.t ........... Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
t/impl-selection/var.t ........... Can't locate Module/Implementation.pm in @INC (you may need to install the Module::Implementation module) (@INC contains: /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1 /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1 .) at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
BEGIN failed--compilation aborted at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
Compilation failed in require at t/impl-selection/var.t line 12.
t/impl-selection/var.t ........... Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
t/io.t ........................... Can't locate object method "new" via package "Package::Stash" at t/io.t line 25.
t/io.t ........................... Dubious, test returned 25 (wstat 6400, 0x1900)
No subtests run
t/isa.t .......................... Can't locate object method "new" via package "Package::Stash" at t/isa.t line 19.
t/isa.t .......................... Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
t/magic.t ........................ Can't locate object method "new" via package "Package::Stash" at t/magic.t line 11.
t/magic.t ........................ Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
t/paamayim_nekdotayim.t .......... Can't locate object method "new" via package "Package::Stash" at t/paamayim_nekdotayim.t line 10.
t/paamayim_nekdotayim.t .......... Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
t/scalar-values.t ................ Can't locate object method "new" via package "Package::Stash" at t/scalar-values.t line 13.
t/scalar-values.t ................ Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
t/stash-deletion.t ............... Can't locate object method "new" via package "Package::Stash" at t/stash-deletion.t line 15.
t/stash-deletion.t ............... Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
t/synopsis.t ..................... Can't locate object method "new" via package "Package::Stash" at t/synopsis.t line 9.
t/synopsis.t ..................... Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
t/warnings.t ..................... Can't locate Module/Implementation.pm in @INC (you may need to install the Module::Implementation module) (@INC contains: /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/arch /home/rabbit/.cpan/build/Test-Requires-0.07-gIlR0B/blib/lib /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/arch /home/rabbit/.cpan/build/Test-Fatal-0.013-u24ETc/blib/lib /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/arch /home/rabbit/.cpan/build/Try-Tiny-0.18-mAXc55/blib/lib /home/rabbit/devel/utils/perl /home/rabbit/devel/distar/lib /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/site_perl/5.18.1 /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.18.1/lib/5.18.1 .) at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
BEGIN failed--compilation aborted at /home/rabbit/.cpan/build/Package-Stash-0.36-IbyZ1_/blib/lib/Package/Stash.pm line 15.
Compilation failed in require at t/warnings.t line 6.
BEGIN failed--compilation aborted at t/warnings.t line 6.
t/warnings.t ..................... Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
Test Summary Report
-------------------
t/00-compile.t (Wstat: 256 Tests: 4 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t/addsub.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
t/basic.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/compile-time.t (Wstat: 256 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 1
t/edge-cases.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
t/extension.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
t/get.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
t/impl-selection/basic-pp.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/impl-selection/basic-xs.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/impl-selection/bug-rt-78272.t (Wstat: 768 Tests: 3 Failed: 3)
Failed tests: 1-3
Non-zero exit status: 3
t/impl-selection/choice.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/impl-selection/env.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/impl-selection/var.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/io.t (Wstat: 6400 Tests: 0 Failed: 0)
Non-zero exit status: 25
Parse errors: No plan found in TAP output
t/isa.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
t/magic.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
t/paamayim_nekdotayim.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
t/scalar-values.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
t/stash-deletion.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
t/synopsis.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
t/warnings.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
Files=25, Tests=8, 1 wallclock secs ( 0.08 usr 0.02 sys + 0.72 cusr 0.12 csys = 0.94 CPU)
Result: FAIL
Failed 21/25 test programs. 5/8 subtests failed.
make: *** [test_dynamic] Error 2
DOY/Package-Stash-0.36.tar.gz
one dependency not OK (Module::Implementation); additionally test harness failed
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports DOY/Package-Stash-0.36.tar.gz
Running make install
make test had returned bad status, won't install without force
Hi Andreas! I have created chef cookbook named cpan for installing cpan modules with cpan client, if it's interesting you may add link for it in CPAN module documentation.
CPAN::Reporter::Smoker checks distroprefs using CPAN::Distribution. So when module is listed, it waits one second, which is not convenient. I see 3 possible ways to skip this delay.
If I understand the docs correctly, doing cpan -T somemodule
on the commandline should just install the module somemodule
without running tests, as if one had done cpan
, followed by notest install somemodule
.
However, on OSX (all versions, starting with 10.4 up through 10.9) and any version of perl starting at 5.14, any tests associated with somemodule
get run anyway, as if I never passed -T
on the commandline.
Using perl-5.20.2 + CPAN-2.10 + latest Archive-Zip:
cpan[1]> get Win32::Lanman
Reading 'C:\Users\shay.cpan\Metadata'
Database was generated on Wed, 06 May 2015 07:29:02 GMT
Running get for module 'Win32::Lanman'
Use of uninitialized value $command in concatenation (.) or string at C:\perl\lib/CPAN/Tarzip.pm line 163.
'-qdt' is not recognized as an internal or external command,
operable program or batch file.
Checksum for C:\Users\shay.cpan\sources\authors\id\J\JH\JHELBERG\lanman.1.0.10.0.zip ok
Scanning cache C:\Users\shay.cpan\build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Where do the "Use of uninitialized value" and "'-qdt' is not recognized" errors come from? Are these problems in CPAN.pm, or maybe just due to crud in Win32-Lanman? The latter is a very old and somewhat non-standard distribution. I don't see these errors when "get"ting other distributions, but most others are .tar.gz rather than .zip anyway.
I'm transferring and splitting up some issues reported in App::Cpan many problems, multiple fixes.
This works:
cpan -g Some::Module
But it doesn't support this:
cpan -g SOMEAUTHOR/Some-Module-1.0.tgz
It should support that.
Patch provided by "eponymous alias" [email protected] in the RT ticket
App.Cpan.patch.txt
With recommends installation enabled, recommends are treated roughly as prerequisites. This is a problem if there is a recommendation of a specific version of perl greater than the version running. There is no way to fulfill that prerequisite, so CPAN.pm refuses to build the module at all, even with strict.
It seems like it will need a special case to ignore "perl" in recommends.
I got a halt because of the failure to install a build requirement.
This occurred installing TAP::Harness::Restricted on a vanilla 18.1.
Needs further investigation -- this is a placeholder for the future.
This is a new ticket to track future issues relating to implemented the recommends/suggests support that had to be reverted.
I've cherry picked the reverted commits into a branch and will look further into the test failures.
The CPAN::Reporter error that @andk saw is due to CPAN::Reporter needing an upgrade to cope with new keys returned from prereq_pm. See this comment.
I'm transferring and splitting up some issues reported in App::Cpan many problems, multiple fixes.
While running cpan -O
to get a list of outdated modules, there are sometimes numeric warnings because cpan
tries to treat all versions strings as floating point numbers.
So my home directory is not cluttered and I can make CPAN follow the XDG Basedir Spec.
PS: Can I customize where local::lib
dumps its shit? That perl5
folder is bogging me...
I am on Ubuntu 21.10. I have this Dockerfile
where I create a non-root user:
FROM ubuntu:20.04
SHELL ["/bin/bash", "-c"]
RUN apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y \
build-essential curl g++ git \
vim sudo wget autoconf libtool \
cmake
ARG user=docker-user
ARG home=/home/$user
RUN useradd --create-home -s /bin/bash $user \
&& echo $user:ubuntu | chpasswd \
&& adduser $user sudo
WORKDIR $home
USER $user
ENV USER=$user
COPY entrypoint.sh $home
ENTRYPOINT ["./entrypoint.sh"]
and entrypoint.sh
script:
#! /bin/bash
perl --version
#cpan -v
cpan Path::Tiny
exec bash
I build a docker image using:
$ docker build -t ubuntu-test-cpan .
and then run the image:
$ docker run -it ubuntu-test-cpan
which gives output:
This is perl 5, version 30, subversion 0 (v5.30.0) built for x86_64-linux-gnu-thread-multi
(with 50 registered patches, see perl -V for more detail)
Copyright 1987-2019, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
Loading internal logger. Log::Log4perl recommended for better logging.
CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.
Would you like to configure as much as possible automatically? [yes]
Use of uninitialized value $what in concatenation (.) or string at /usr/share/perl/5.30/App/Cpan.pm line 679, <STDIN> line 1.
Warning: You do not have write permission for Perl library directories.
To install modules, you need to configure a local Perl library directory or
escalate your privileges. CPAN can help you by bootstrapping the local::lib
module or by configuring itself to use 'sudo' (if available). You may also
resolve this problem manually if you need to customize your setup.
What approach do you want? (Choose 'local::lib', 'sudo' or 'manual')
[local::lib]
Attempting to create directory /home/docker-user/perl5
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for local::lib
Writing MYMETA.yml and MYMETA.json
cp lib/lib/core/only.pm blib/lib/lib/core/only.pm
cp lib/local/lib.pm blib/lib/local/lib.pm
cp lib/POD2/PT_BR/local/lib.pod blib/lib/POD2/PT_BR/local/lib.pod
cp lib/POD2/DE/local/lib.pod blib/lib/POD2/DE/local/lib.pod
Manifying 4 pod documents
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-I/home/docker-user/perl5/lib/perl5" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/bad_variables.t ...... ok
t/carp-mismatch.t ...... ok
t/classmethod.t ........ ok
t/de-dup.t ............. ok
t/lib-core-only.t ...... ok
t/pipeline.t ........... ok
t/shell.t .............. ok
t/stackable.t .......... ok
t/subroutine-in-inc.t .. ok
t/taint-mode.t ......... ok
All tests successful.
Files=10, Tests=149, 1 wallclock secs ( 0.04 usr 0.01 sys + 1.05 cusr 0.32 csys = 1.42 CPU)
Result: PASS
Manifying 4 pod documents
Installing /home/docker-user/perl5/lib/perl5/lib/core/only.pm
Installing /home/docker-user/perl5/lib/perl5/local/lib.pm
Installing /home/docker-user/perl5/lib/perl5/POD2/PT_BR/local/lib.pod
Installing /home/docker-user/perl5/lib/perl5/POD2/DE/local/lib.pod
Installing /home/docker-user/perl5/man/man3/POD2::DE::local::lib.3pm
Installing /home/docker-user/perl5/man/man3/lib::core::only.3pm
Installing /home/docker-user/perl5/man/man3/POD2::PT_BR::local::lib.3pm
Installing /home/docker-user/perl5/man/man3/local::lib.3pm
Appending installation info to /home/docker-user/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod
Use of uninitialized value $_[0] in substitution (s///) at /usr/share/perl/5.30/File/Basename.pm line 341.
fileparse(): need a valid pathname at /usr/share/perl/5.30/CPAN/FirstTime.pm line 1413.
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
So the installation ends with the error: fileparse(): need a valid pathname at /usr/share/perl/5.30/CPAN/FirstTime.pm line 1413
before it is finished installing Path::Tiny
.
If I use the root user instead of the constructed docker-user
in Dockerfile
it works fine.
I have for a long time had a policy to first see if any dependencies of packages I install can be satisfied by the Linux distro I'm using. In practice, it means I check Debian stable first, and manually install it from there, and only if it can't, I install it from CPAN. This was actually reflected in policy in companies I worked for, we would only install from CPAN if one of the devs knew the code well. Since distros has a bit of extra QA process and since this means the behaviour doesn't change underneath you. I think it is a strength of the CPAN ecosystem that you can do this, quite unlike others where you are on a perpetual hampster wheel of upgrades.
You can often determine Debian package name from a CPAN module with some regexps, but recently, I found that metacpan has a field that gives the distro package name for a CPAN package.
Then, I figured, perhaps cpan
now could do it for me, i.e. check if the package I install can be found in the distro, if so, install it from there. If not, grab it from CPAN, but check if any dependencies can be satisfied by a distro package. In this case, the version doesn't need to be the latest, it just needs to satisfy the version dependency.
I am on Windows 11 in WSL terminal for Ubuntu 20.04.
$ perl --version | head -1
This is perl 5, version 30, subversion 0 (v5.30.0) built for x86_64-linux-gnu-thread-multi
$ which perl
/usr/bin/perl
$ cpan App::cpanminus
Loading internal logger. Log::Log4perl recommended for better logging
CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.
Would you like to configure as much as possible automatically? [yes]
Use of uninitialized value $what in concatenation (.) or string at /usr/share/perl/5.30/App/Cpan.pm line 679, <STDIN> line 1.
Warning: You do not have write permission for Perl library directories.
To install modules, you need to configure a local Perl library directory or
escalate your privileges. CPAN can help you by bootstrapping the local::lib
module or by configuring itself to use 'sudo' (if available). You may also
resolve this problem manually if you need to customize your setup.
What approach do you want? (Choose 'local::lib', 'sudo' or 'manual')
[local::lib]
Attempting to create directory /home/hakon/perl5
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for local::lib
Writing MYMETA.yml and MYMETA.json
Can't locate local/lib.pm in @INC (you may need to install the local::lib module) (@INC contains: /home/hakon/perl5/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl/5.30/CPAN/FirstTime.pm line 1357.
It'd be great if cpan install fails it return exit status
<> 0. In automated deploy via chef-client this feature is vital.
I'm running:
${HOME}/perl5/bin/cpan version 1.64 calling Getopt::Std::getopts (version 1.12 [paranoid]),
running under Perl version 5.28.1.
I have been trying to run installs without testing by setting the CPAN_OPTS
environment variable as documented, e.g. here (as well as in the cpan
manpages on all of my machines). The problem is that the contents of that variable seem to be appended rather than prepended to the rest of my arguments.
The three commands
cpan CPAN -T
CPAN_OPTS="-T" cpan CPAN
export CPAN_OPTS="-T" && cpan CPAN
have exactly the same effect:
Loading internal logger. Log::Log4perl recommended for better logging
Reading '${HOME}/.cpan/Metadata'
Database was generated on Thu, 02 Jan 2020 14:41:03 GMT
CPAN is up to date (2.27).
>(error): Could not expand [-T]. Check the module name.
>(info): I can suggest names if you install one of Text::Levenshtein::XS, Text::Levenshtein::Damerau::XS, Text::Levenshtein, and Text::Levenshtein::Damerau::PP
>(info): and you provide the -x option on invocation.
>(error): Skipping -T because I couldn't find a matching namespace.
In retrospect, it should be easy to see why this would happen. In the cloned git repo:
$ grep -rE '_OPTS' ./
./scripts/cpan:=item CPAN_OPTS
./lib/App/Cpan.pm:=item CPAN_OPTS
./lib/App/Cpan.pm: push @ARGV, grep $_, split /\s+/, $ENV{CPAN_OPTS} || '';
That last line push
es instead of unshift
ing. But then how are any of these options supposed to work?
I'm transferring and splitting up some issues reported in App::Cpan many problems, multiple fixes.
The internal _download
function uses LWP directly. I need to fix this to use CPAN.pm's mechanism.
Patch provided by "eponymous alias" [email protected] in the RT ticket
App.Cpan.patch.txt
I have Perl 5.34 with local::lib installed through my Linux package manager. The following variables are exported
export PATH="perl_modules/bin${PATH:+:${PATH}}"
export PERL5LIB="perl_modules/lib/perl5"
export PERL_LOCAL_LIB_ROOT="perl_modules"
export PERL_MB_OPT="--install_base perl_modules"
export PERL_MM_OPT="INSTALL_BASE=perl_modules"
This is so I can have a perl_modules folder relative to my project folder, analagous to npm and node_modules. However, Installing anything with cpan installs to a perl_modules directory inside the build folder, i.e., ~/.cpan/build/CPAN-2.29-0/perl_modules
.
When running cpan for the very first, I can spot this error on some weird config when answering no
to the first question.
> /usr/local/cpanel/3rdparty/perl/528/bin/cpan install Acme
--
CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.
Would you like to configure as much as possible automatically? [yes]
Use of uninitialized value $what in concatenation (.) or string at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/App/Cpan.pm line 677, <STDIN> line 1.
After adding some extra debug information it seems to come from CPAN::FirstTime::my_prompt_loop
when called with install_help
. It's looking for an install_help_prompt
which does not exist.
Would you like to configure as much as possible automatically? [yes] no
--
at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/CPAN/FirstTime.pm line 1700, <STDIN> line 1.
CPAN::FirstTime::my_prompt_loop("install_help", "manual", "", "local::lib\|sudo\|manual") called at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/CPAN/FirstTime.pm line 848
CPAN::FirstTime::init("/root/.cpan/CPAN/MyConfig.pm") called at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/CPAN/HandleConfig.pm line 586
CPAN::HandleConfig::load("CPAN::HandleConfig") called at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/CPAN/Shell.pm line 1570
CPAN::Shell::optprint("CPAN::Shell", "load_module", "CPAN: File::HomeDir loaded ok (v1.004)\x{a}") called at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/CPAN.pm line 1209
CPAN::has_inst(CPAN=HASH(0x33448c8), "File::HomeDir", undef) called at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/CPAN.pm line 1023
CPAN::has_usable(CPAN=HASH(0x33448c8), "File::HomeDir") called at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/CPAN/HandleConfig.pm line 525
CPAN::HandleConfig::cpan_home_dir_candidates() called at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/CPAN/HandleConfig.pm line 634
CPAN::HandleConfig::cpan_home() called at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/CPAN/HandleConfig.pm line 486
CPAN::HandleConfig::require_myconfig_or_config() called at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/CPAN/HandleConfig.pm line 554
CPAN::HandleConfig::load("CPAN::HandleConfig", "write_file", 0) called at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/App/Cpan.pm line 436
App::Cpan::_process_setup_options("App::Cpan", HASH(0x33a03d0)) called at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/App/Cpan.pm line 514
App::Cpan::run("App::Cpan", "*Data::Dumper::can", "Acme") called at /usr/local/cpanel/3rdparty/perl/528/bin/cpan line 13
Here is a suggested patch
diff --git a/lib/App/Cpan.pm b/lib/App/Cpan.pm
index e161257d..54b11c2c 100644
--- a/lib/App/Cpan.pm
+++ b/lib/App/Cpan.pm
@@ -681,7 +681,7 @@ sub _hook_into_CPANpm_report
*CPAN::Shell::myprint = sub {
my($self,$what) = @_;
- $scalar .= $what;
+ $scalar .= $what if defined $what;
$self->print_ornamented($what,
$CPAN::Config->{colorize_print}||'bold blue on_white',
);
diff --git a/lib/CPAN/FirstTime.pm b/lib/CPAN/FirstTime.pm
index d45414f9..0df33e70 100644
--- a/lib/CPAN/FirstTime.pm
+++ b/lib/CPAN/FirstTime.pm
@@ -1698,7 +1698,8 @@ sub my_prompt_loop {
my $ans;
if (!$auto_config && (!$m || $item =~ /$m/)) {
- $CPAN::Frontend->myprint($prompts{$item . "_intro"});
+ my $intro = $prompts{$item . "_intro"};
+ $CPAN::Frontend->myprint($intro) if defined $intro;
$CPAN::Frontend->myprint(" <$item>\n");
do { $ans = prompt($prompts{$item}, $default);
} until $ans =~ /$ok/;
Greetings,
As part of p5p RT ticket https://rt.perl.org/Ticket/Display.html?id=130467, we want to change the default builds of 5.26+ to not include . in @inc. We have acknowledged that the one place that this will not work (for a VERY long time) is during build/test/install of CPAN modules.
I would like to submit a patch to cpanpm to do:
BEGIN {
$ENV{PERL_USE_UNSAFE_INC} = 1 unless exists $ENV{PERL_USE_UNSAFE_INC};
}
However in light of bdfc5d8, we DO NOT want to do this for all child processes of scripts/cpan. We only want to do this during build/test/look I think. My problem is that it's proving to not be easy to find where the place(s) would be.
Can you offer any advice on this? We're needed to get this resolved, merged as it's a blocker for RT 130467 which is a blocker for 5.26.
Thanks!
Todd
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.