This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id:
133205
Status:
open
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
jkeenan [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)

Attachments


Subject: Experimental 'recommends_policy' option, turned on by default, leads to surprises for users
The man page for CPAN.pm (e.g., https://metacpan.org/pod/release/ANDK/CPAN-2.28/lib/CPAN.pm) lists these two configuration variables: ##### recommends_policy whether recommended prerequisites should be included ... suggests_policy whether suggested prerequisites should be included ##### This man page provides no further documentation of these policies. One has to go deeper into the distribution, to lib/CPAN/FirstTime.pm, to find a more complete description: ##### recommends_policy (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. ... suggests_policy (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. ##### These features appear to have been added to the CPAN distribution around 2013, which means that they have been shipping with the Perl core distribution since 2014. Now, when I see some functionality described as an 'Experimental feature', my assumption is that it is turned OFF by default and that if I want to use it I have to type some code that turns it ON. For example, if in perl-5.32, I want to use the 'lexical_subs' feature, I have to say: "use experimental 'lexical_subs';". 'suggests_policy' is turned OFF by default, but 'recommends_policy' is turned on. Granted, you do have that statement there say that 'recommends' modules should be installed except where resources don't permit. But you don't explicitly say that this is turned ON by default (which I would guess means that 'y' is the default choice in the installation script). For me, this has repeatedly had adverse consequences which have caused me to generally prefer 'cpanm' as my installer over 'cpan'. In my attempts over recent years to provide another approach to the "Blead Breaks CPAN" problem, I have run a program, "CPAN River 3000," in which I attempt to install 3000 CPAN distributions against a monthly development release of perl -- and install them in dependency order. So the guts of that program essentially is: ##### cat list-of-3000-modules | xargs ./bin/cpanm ##### ..., then parse the .cpanm build log and analyze results. 'cpanm' apparently does *not* attempt to install modules listed in a distro's 'runtime:recommends', 'runtime:suggests' or similar metadata stanzas. So that means that the modules actually installed against a monthly perl release very closely track the list of 3000 modules I feed to 'cpanm'. In particular, it means that if I do not want a particular distro to be included in the list of 3000 modules (say, it times out too much during testing or goes into infinite loops), then it's not very difficult for me to exclude it and to exclude its reverse dependencies as well. I run no risk of pulling in a badly behaved distro that happens to be listed in another distro's 'runtime:recommends' or 'testing:recommends' metadata. In simple terms, 'cpanm' DWIMs. 'cpanm', however, turns out to be much less 'strict-compliant' than 'cpan'. In Perl 5 this is of little consequence. But suppose I'm working on a future version of perl in which strict is turned on by default. In other words, suppose I'm working on a leading candidate for Perl 7 (https://github.com/atoomic/perl/issues/153). It turns out that 'cpanm' so far fails with Perl 7 for a variety of reasons. And since it's code is fat-packed, it's not easy for someone not named Miyagawa to hack on it. Miraculously, 'cpan' works with Perl 7 right out of the box. So the first time I went to try to install CPAN modules in dependency order (a "CPAN River 200" rather than a "3000") against a Perl 7 executable, it Just Worked! Well, it worked until I got to SOAP::Lite, which is #520 in my most recent calculation of the CPAN River. SOAP::Lite has many modules in its 'recommends' and 'suggests' section. 'cpan' manages to install SOAP::Lite and then -- since, by default, CPAN::FirstTime's 'recommends_policy' is ON by default -- it proceeds to try to install all the distros in its 'runtime:recommends' section -- and *their* dependencies -- until it gets to 'mod_perl'. And there all hell breaks loose. See: https://rt.cpan.org/Ticket/Display.html?id=131952#txn-1909221. Also, at this point see the plain-text file I am attaching to this ticket which provides data about side-by-side attempts to install SOAP::Lite with 'cpanm' and 'cpan'. Recommendations: * 'recommends_policy' and 'suggests_policy' have presumably been "experimental" for 6 years now. Perhaps it's time to reconsider their status. * Regardless of whether 'recommends_policy' remains experimental or not, it should be set to OFF by default. This would require revision of the documentation in CPAN::FirstTime above, and it would require a *one-character* code change at line 956 of lib/CPAN/FirstTime.pm. (I can supply a pull request upon request.) * If for some reason you want to continue to have 'recommends_policy' set to ON by default, then that decision should appear in the Config Variables section of CPAN.pm (https://metacpan.org/pod/CPAN#Config-Variables). It should not simply be buried in CPAN::FirstTime. * I install perls for testing purposes *many* times a week, using a shell script to do so. That shell script uses a 'wget' to fetch and install 'cpanm' immediately after it installs perl. If I am to use 'cpan' in a similar manner, then I need a shell one-liner that I can include in my shell script that immediately turns 'recommends_policy' OFF for any CPAN.pm or 'cpan' I install. Can you provide me with such a one-liner? Thank you very much. Jim Keenan
Subject: cpan-vs-cpanm-recommends-suggests.txt
0cf01644e9 # v5.32.0 21d681b3bd # 1 commit later only changes Porting/release_schedule.pod $ cd $TESTINGDIR $ cd 0cf01644e9 $ ./bin/perl -v | head -2 | tail -1 This is perl 5, version 32, subversion 0 (v5.32.0) built for amd64-freebsd-thread-multi $ cd ../21d681b3bd $ ./bin/perl -v | head -2 | tail -1 This is perl 5, version 32, subversion 0 (v5.32.0-1-g21d681b3bd) built for amd64-freebsd-thread-multi So I now have 2 perls with fundamentally the same functionality installed sitting side-by-side. In 0cf01644e9 I will use 'cpan' as my module installer. In 21d681b3bd I will use 'cpanm' as my module installer. In each directory I will use the installer to install SOAP::Lite (https://metacpan.org/pod/SOAP::Lite). I select this distro because its metadata (https://metacpan.org/source/PHRED/SOAP-Lite-1.27/META.json) has lists in 'runtime:recommends', 'runtime:suggests', and 'test:recommends'. The objective is to see how each of the two installers will handle this metadata "right out of the box," i.e., without providing any extra command-line arguments. Will the installer install the "recommends" and/or the "suggests"? Or will it just install the "requires"? ########## Using 'cpanm' ########## $ cd ../21d681b3bd $ ./bin/cpanm SOAP::Lite ... Building and testing IO-SessionData-1.03 ... OK Successfully installed IO-SessionData-1.03 Building and testing SOAP-Lite-1.27 ... OK Successfully installed SOAP-Lite-1.27 37 distributions installed # MIME::Tools is 'runtime:recommends' $ ./bin/perl -Ilib -MMIME::Tools -E 'say q|hello world|' Can't locate MIME/Tools.pm in @INC (you may need to install the MIME::Tools module) (@INC contains: lib /home/jkeenan/testing/21d681b3bd/lib/perl5/site_perl/5.32.0/amd64-freebsd-thread-multi /home/jkeenan/testing/21d681b3bd/lib/perl5/site_perl/5.32.0 /home/jkeenan/testing/21d681b3bd/lib/perl5/5.32.0/amd64-freebsd-thread-multi /home/jkeenan/testing/21d681b3bd/lib/perl5/5.32.0). BEGIN failed--compilation aborted. # SOAP::Transport::MQ is 'runtime:suggests' $ ./bin/perl -Ilib -MSOAP::Transport::MQ -E 'say q|hello world|' Can't locate SOAP/Transport/MQ.pm in @INC (you may need to install the SOAP::Transport::MQ module) (@INC contains: lib /home/jkeenan/testing/21d681b3bd/lib/perl5/site_perl/5.32.0/amd64-freebsd-thread-multi /home/jkeenan/testing/21d681b3bd/lib/perl5/site_perl/5.32.0 /home/jkeenan/testing/21d681b3bd/lib/perl5/5.32.0/amd64-freebsd-thread-multi /home/jkeenan/testing/21d681b3bd/lib/perl5/5.32.0). BEGIN failed--compilation aborted. # Test::XML is 'test:recommends' $ ./bin/perl -Ilib -MTest::XML -E 'say q|hello world|' Can't locate Test/XML.pm in @INC (you may need to install the Test::XML module) (@INC contains: lib /home/jkeenan/testing/21d681b3bd/lib/perl5/site_perl/5.32.0/amd64-freebsd-thread-multi /home/jkeenan/testing/21d681b3bd/lib/perl5/site_perl/5.32.0 /home/jkeenan/testing/21d681b3bd/lib/perl5/5.32.0/amd64-freebsd-thread-multi /home/jkeenan/testing/21d681b3bd/lib/perl5/5.32.0). BEGIN failed--compilation aborted. # the module itself $ ./bin/perl -Ilib -MSOAP::Lite -E 'say q|hello world|' hello world # XML::Parser is 'runtime:requires' $ ./bin/perl -Ilib -MXML::Parser -E 'say q|hello world|' hello world # distros installed in this session $ ls -ltr ~/.cpanm/latest-build/ drwxr-xr-x 7 jkeenan jkeenan 22 Aug 21 15:15 Sub-Uplevel-0.2800 drwxr-xr-x 4 jkeenan jkeenan 15 Aug 21 15:15 Test-Warn-0.36 drwx------ 6 jkeenan jkeenan 22 Aug 21 15:15 Task-Weaken-1.06 drwxr-xr-x 6 jkeenan jkeenan 19 Aug 21 15:15 Test-Requires-0.11 drwxr-xr-x 5 jkeenan jkeenan 16 Aug 21 15:15 XML-Parser-Lite-0.722 drwxr-xr-x 5 jkeenan jkeenan 18 Aug 21 15:15 ExtUtils-Config-0.008 drwxr-xr-x 6 jkeenan jkeenan 18 Aug 21 15:15 ExtUtils-InstallPaths-0.012 drwxr-xr-x 6 jkeenan jkeenan 19 Aug 21 15:15 ExtUtils-Helpers-0.026 drwxr-xr-x 5 jkeenan jkeenan 19 Aug 21 15:15 Module-Build-Tiny-0.039 drwxr-xr-x 5 jkeenan jkeenan 15 Aug 21 15:16 TimeDate-2.33 drwxr-xr-x 6 jkeenan jkeenan 24 Aug 21 15:16 HTTP-Date-6.05 drwx------ 7 jkeenan jkeenan 21 Aug 21 15:16 Try-Tiny-0.30 drwxr-xr-x 7 jkeenan jkeenan 19 Aug 21 15:16 Test-Fatal-0.016 drwxr-xr-x 6 jkeenan jkeenan 20 Aug 21 15:16 LWP-MediaTypes-6.04 drwxr-xr-x 5 jkeenan jkeenan 15 Aug 21 15:16 Encode-Locale-1.05 drwxr-xr-x 6 jkeenan jkeenan 17 Aug 21 15:16 IO-HTML-1.001 drwxr-xr-x 6 jkeenan jkeenan 17 Aug 21 15:16 Test-Needs-0.002006 drwxr-xr-x 6 jkeenan jkeenan 20 Aug 21 15:16 URI-1.76 drwxr-xr-x 6 jkeenan jkeenan 25 Aug 21 15:16 HTTP-Message-6.25 drwxr-xr-x 6 jkeenan jkeenan 22 Aug 21 15:16 HTTP-Daemon-6.12 drwxr-xr-x 5 jkeenan jkeenan 14 Aug 21 15:16 HTTP-Negotiate-6.01 drwxr-xr-x 4 jkeenan jkeenan 15 Aug 21 15:16 HTML-Tagset-3.20 drwxr-xr-x 7 jkeenan jkeenan 32 Aug 21 15:16 HTML-Parser-3.72 drwxr-xr-x 5 jkeenan jkeenan 18 Aug 21 15:16 Test-RequiresInternet-0.05 drwxr-xr-x 6 jkeenan jkeenan 24 Aug 21 15:16 HTTP-Cookies-6.08 drwxr-xr-x 5 jkeenan jkeenan 14 Aug 21 15:16 WWW-RobotRules-6.02 drwxr-xr-x 6 jkeenan jkeenan 24 Aug 21 15:16 Net-HTTP-6.19 drwxr-xr-x 5 jkeenan jkeenan 14 Aug 21 15:16 File-Listing-6.04 drwxr-xr-x 8 jkeenan jkeenan 26 Aug 21 15:17 libwww-perl-6.47 drwxr-xr-x 8 jkeenan jkeenan 19 Aug 21 15:17 XML-Parser-2.46 drwxr-xr-x 7 jkeenan jkeenan 22 Aug 21 15:17 Class-Inspector-1.36 drwxr-xr-x 7 jkeenan jkeenan 31 Aug 21 15:17 Net-SSLeay-1.88 drwxr-xr-x 8 jkeenan jkeenan 20 Aug 21 15:17 IO-Socket-SSL-2.068 drwxr-xr-x 5 jkeenan jkeenan 17 Aug 21 15:18 Mozilla-CA-20200520 drwxr-xr-x 6 jkeenan jkeenan 23 Aug 21 15:18 LWP-Protocol-https-6.09 drwxr-xr-x 5 jkeenan jkeenan 15 Aug 21 15:18 IO-SessionData-1.03 drwxr-xr-x 7 jkeenan jkeenan 22 Aug 21 15:18 SOAP-Lite-1.27 Summary: 'cpanm' DWIMmed. It installed SOAP-Lite's prerequisites and SOAP-Lite itself, but did *not* attempt to install any distros in its 'recommends' or 'suggests' metadata sections. ########## Using 'cpan' ########## $ cd ../0cf01644e9 $ ./bin/cpan SOAP::Lite # ... coming back to the keyboard 15 minutes later ... Can't stat `../apache_x.x/src' Please tell me where I can find your apache src [../apache_x.x/src] ../apache_x.x/src Can't stat `../apache_x.x/src' Please tell me where I can find your apache src [../apache_x.x/^Csrc] Warning: No success on command[/usr/home/jkeenan/testing/0cf01644e9/bin/perl Makefile.PL] GOZER/mod_perl-1.31.tar.gz /usr/home/jkeenan/testing/0cf01644e9/bin/perl Makefile.PL -- NOT OK Test::XML is up to date (0.08). Test::MockObject is up to date (1.20200122). MIME::Tools is up to date (5.509). HTTP::Daemon is up to date (6.12). DIME::Tools is up to date (0.04). Running install for module 'Apache' GOZER/mod_perl-1.31.tar.gz Has already been unwrapped into directory /home/jkeenan/.cpan/build/mod_perl-1.31-1 GOZER/mod_perl-1.31.tar.gz '/usr/home/jkeenan/testing/0cf01644e9/bin/perl Makefile.PL' returned status 2, not re-running # MIME::Tools is 'runtime:recommends' $ ./bin/perl -Ilib -MMIME::Tools -E 'say q|hello world|' hello world # SOAP::Transport::MQ is 'runtime:suggests' ./bin/perl -Ilib -MSOAP::Transport::MQ -E 'say q|hello world|' Can't locate SOAP/Transport/MQ.pm in @INC (you may need to install the SOAP::Transport::MQ module) (@INC contains: lib /home/jkeenan/testing/0cf01644e9/lib/perl5/site_perl/5.32.0/amd64-freebsd-thread-multi /home/jkeenan/testing/0cf01644e9/lib/perl5/site_perl/5.32.0 /home/jkeenan/testing/0cf01644e9/lib/perl5/5.32.0/amd64-freebsd-thread-multi /home/jkeenan/testing/0cf01644e9/lib/perl5/5.32.0). BEGIN failed--compilation aborted. # Test::XML is 'test:recommends' $ ./bin/perl -Ilib -MTest::XML -E 'say q|hello world|' hello world # the module itself $ ./bin/perl -Ilib -MSOAP::Lite -E 'say q|hello world|' hello world # XML::Parser is 'runtime:requires' $ ./bin/perl -Ilib -MXML::Parser -E 'say q|hello world|' hello world $ ls -ltr ~/.cpan/build drwxr-xr-x 7 jkeenan jkeenan 22 Aug 21 14:58 Class-Inspector-1.36-0 drwxr-xr-x 5 jkeenan jkeenan 15 Aug 21 14:58 IO-SessionData-1.03-1 drwxr-xr-x 7 jkeenan jkeenan 31 Aug 21 14:58 Net-SSLeay-1.88-0 drwxr-xr-x 8 jkeenan jkeenan 20 Aug 21 14:59 IO-Socket-SSL-2.068-0 drwxr-xr-x 5 jkeenan jkeenan 15 Aug 21 15:00 Encode-Locale-1.05-0 drwxr-xr-x 5 jkeenan jkeenan 15 Aug 21 15:00 TimeDate-2.33-0 drwxr-xr-x 6 jkeenan jkeenan 24 Aug 21 15:00 HTTP-Date-6.05-0 drwxr-xr-x 5 jkeenan jkeenan 14 Aug 21 15:00 File-Listing-6.04-0 drwxr-xr-x 4 jkeenan jkeenan 15 Aug 21 15:00 HTML-Tagset-3.20-0 drwxr-xr-x 7 jkeenan jkeenan 32 Aug 21 15:00 HTML-Parser-3.72-0 drwxr-xr-x 6 jkeenan jkeenan 17 Aug 21 15:00 IO-HTML-1.001-0 drwxr-xr-x 7 jkeenan jkeenan 21 Aug 21 15:00 Try-Tiny-0.30-0 drwxr-xr-x 7 jkeenan jkeenan 19 Aug 21 15:00 Test-Fatal-0.016-0 drwxr-xr-x 6 jkeenan jkeenan 20 Aug 21 15:00 LWP-MediaTypes-6.04-0 drwxr-xr-x 6 jkeenan jkeenan 17 Aug 21 15:00 Test-Needs-0.002006-1 drwxr-xr-x 6 jkeenan jkeenan 20 Aug 21 15:00 URI-1.76-0 drwxr-xr-x 6 jkeenan jkeenan 25 Aug 21 15:00 HTTP-Message-6.25-0 drwxr-xr-x 6 jkeenan jkeenan 24 Aug 21 15:01 HTTP-Cookies-6.08-0 drwxr-xr-x 5 jkeenan jkeenan 18 Aug 21 15:01 ExtUtils-Config-0.008-0 drwxr-xr-x 6 jkeenan jkeenan 19 Aug 21 15:01 ExtUtils-Helpers-0.026-0 drwxr-xr-x 6 jkeenan jkeenan 18 Aug 21 15:01 ExtUtils-InstallPaths-0.012-0 drwxr-xr-x 9 jkeenan jkeenan 22 Aug 21 15:02 Module-Build-0.4231-0 drwxr-xr-x 5 jkeenan jkeenan 19 Aug 21 15:02 Module-Build-Tiny-0.039-0 drwxr-xr-x 6 jkeenan jkeenan 22 Aug 21 15:02 HTTP-Daemon-6.12-0 drwxr-xr-x 5 jkeenan jkeenan 14 Aug 21 15:02 HTTP-Negotiate-6.01-0 drwxr-xr-x 6 jkeenan jkeenan 24 Aug 21 15:02 Net-HTTP-6.19-0 drwxr-xr-x 5 jkeenan jkeenan 18 Aug 21 15:02 Test-RequiresInternet-0.05-0 drwxr-xr-x 5 jkeenan jkeenan 14 Aug 21 15:02 WWW-RobotRules-6.02-0 drwxr-xr-x 8 jkeenan jkeenan 26 Aug 21 15:02 libwww-perl-6.47-0 drwxr-xr-x 9 jkeenan jkeenan 25 Aug 21 15:03 Test-LeakTrace-0.16-0 drwxr-xr-x 5 jkeenan jkeenan 17 Aug 21 15:03 Mozilla-CA-20200520-0 drwxr-xr-x 6 jkeenan jkeenan 23 Aug 21 15:03 LWP-Protocol-https-6.09-0 drwxr-xr-x 6 jkeenan jkeenan 22 Aug 21 15:03 Task-Weaken-1.06-0 drwxr-xr-x 7 jkeenan jkeenan 22 Aug 21 15:03 Sub-Uplevel-0.2800-0 drwxr-xr-x 4 jkeenan jkeenan 15 Aug 21 15:03 Test-Warn-0.36-0 drwxr-xr-x 8 jkeenan jkeenan 19 Aug 21 15:03 XML-Parser-2.46-0 drwxr-xr-x 6 jkeenan jkeenan 19 Aug 21 15:03 Test-Requires-0.11-0 drwxr-xr-x 5 jkeenan jkeenan 16 Aug 21 15:03 XML-Parser-Lite-0.722-1 drwxr-xr-x 7 jkeenan jkeenan 22 Aug 21 15:03 SOAP-Lite-1.27-1 drwxr-xr-x 9 jkeenan jkeenan 22 Aug 21 15:03 XML-SemanticDiff-1.0007-1 drwxr-xr-x 6 jkeenan jkeenan 16 Aug 21 15:03 Test-XML-0.08-1 drwxr-xr-x 6 jkeenan jkeenan 22 Aug 21 15:03 Path-Tiny-0.114-0 drwxr-xr-x 6 jkeenan jkeenan 21 Aug 21 15:04 Unicode-UTF8-0.62-0 drwxr-xr-x 7 jkeenan jkeenan 23 Aug 21 15:04 Test-MockRandom-1.01-0 drwxr-xr-x 7 jkeenan jkeenan 23 Aug 21 15:04 Capture-Tiny-0.48-1 drwxr-xr-x 6 jkeenan jkeenan 22 Aug 21 15:05 Test-FailWarnings-0.008-0 drwxr-xr-x 6 jkeenan jkeenan 19 Aug 21 15:05 XML-XPath-1.44-0 drwxr-xr-x 6 jkeenan jkeenan 27 Aug 21 15:05 XML-Twig-3.52-1 drwxr-xr-x 5 jkeenan jkeenan 19 Aug 21 15:06 XML-NamespaceSupport-1.12-0 drwxr-xr-x 5 jkeenan jkeenan 17 Aug 21 15:06 XML-SAX-Base-1.09-0 drwxr-xr-x 6 jkeenan jkeenan 17 Aug 21 15:06 XML-SAX-1.02-0 drwxr-xr-x 4 jkeenan jkeenan 13 Aug 21 15:06 XML-Filter-BufferText-1.01-1 drwxr-xr-x 5 jkeenan jkeenan 21 Aug 21 15:06 XML-SAX-Writer-0.57-1 drwxr-xr-x 6 jkeenan jkeenan 16 Aug 21 15:06 Test-Exception-0.43-0 drwxr-xr-x 5 jkeenan jkeenan 16 Aug 21 15:06 UNIVERSAL-can-1.20140328-0 drwxr-xr-x 6 jkeenan jkeenan 20 Aug 21 15:06 UNIVERSAL-isa-1.20171012-0 drwxr-xr-x 5 jkeenan jkeenan 17 Aug 21 15:06 Test-MockObject-1.20200122-0 drwxr-xr-x 7 jkeenan jkeenan 20 Aug 21 15:06 MailTools-2.21-0 drwxr-xr-x 5 jkeenan jkeenan 16 Aug 21 15:06 Test-Deep-1.130-0 drwxr-xr-x 10 jkeenan jkeenan 21 Aug 21 15:06 MIME-tools-5.509-1 drwxr-xr-x 6 jkeenan jkeenan 18 Aug 21 15:06 File-Slurp-9999.32-0 drwxr-xr-x 6 jkeenan jkeenan 16 Aug 21 15:07 Class-Data-Inheritable-0.08-0 drwxr-xr-x 6 jkeenan jkeenan 26 Aug 21 15:07 Devel-StackTrace-2.04-0 drwxr-xr-x 7 jkeenan jkeenan 26 Aug 21 15:07 Exception-Class-1.44-0 drwxr-xr-x 5 jkeenan jkeenan 19 Aug 21 15:07 Algorithm-Diff-1.1903-0 drwxr-xr-x 5 jkeenan jkeenan 16 Aug 21 15:07 Text-Diff-1.45-0 drwxr-xr-x 5 jkeenan jkeenan 16 Aug 21 15:07 Test-Differences-0.67-0 drwxr-xr-x 6 jkeenan jkeenan 17 Aug 21 15:07 Test-Most-0.37-0 drwxr-xr-x 10 jkeenan jkeenan 24 Aug 21 15:07 Convert-BinHex-1.125-1 drwxr-xr-x 8 jkeenan jkeenan 22 Aug 21 15:07 IO-Stringy-2.113-0 drwxr-xr-x 4 jkeenan jkeenan 40 Aug 21 15:07 FCGI-0.79-1 drwxr-xr-x 5 jkeenan jkeenan 24 Aug 21 15:07 Data-UUID-1.226-0 drwxr-xr-x 6 jkeenan jkeenan 18 Aug 21 15:07 DIME-Tools-0.04-1 drwxr-xr-x 23 jkeenan jkeenan 50 Aug 21 15:07 mod_perl-1.31-1 # Note that even after 'cpan' has installed SOAP::Lite, it forges onward installing distros that were in one of the 'recommends' or 'suggests' categories -- or those distros' dependencies -- until it gags on mod_perl. SOAP-Lite-1.27-1 XML-SemanticDiff-1.0007-1 Test-XML-0.08-1 Path-Tiny-0.114-0 Unicode-UTF8-0.62-0 Test-MockRandom-1.01-0 Capture-Tiny-0.48-1 Test-FailWarnings-0.008-0 XML-XPath-1.44-0 XML-Twig-3.52-1 XML-NamespaceSupport-1.12-0 XML-SAX-Base-1.09-0 XML-SAX-1.02-0 XML-Filter-BufferText-1.01-1 XML-SAX-Writer-0.57-1 Test-Exception-0.43-0 UNIVERSAL-can-1.20140328-0 UNIVERSAL-isa-1.20171012-0 Test-MockObject-1.20200122-0 MailTools-2.21-0 Test-Deep-1.130-0 MIME-tools-5.509-1 File-Slurp-9999.32-0 Class-Data-Inheritable-0.08-0 Devel-StackTrace-2.04-0 Exception-Class-1.44-0 Algorithm-Diff-1.1903-0 Text-Diff-1.45-0 Test-Differences-0.67-0 Test-Most-0.37-0 Convert-BinHex-1.125-1 IO-Stringy-2.113-0 FCGI-0.79-1 Data-UUID-1.226-0 DIME-Tools-0.04-1 mod_perl-1.31-1 Summary: 'cpan' did *not* DWIM. It attempted to install modules in SOAP::Lite's 'runtime:recommends' list, one of which is the most badly behaved module in all of CPAN (with respect to automated installation and testing). I had specifically excluded that module from the list I presented to 'cpan', but 'cpan' attempted it anyway. It borked my program.
On 2020-08-21 11:13:40, JKEENAN wrote:
Show quoted text
> This man page provides no further documentation of these policies. > One has to go deeper into the distribution, to lib/CPAN/FirstTime.pm, > to find a more complete description:
The documentation for the 'recommends' and 'suggests' properties of distribution metadata is documented here: https://metacpan.org/pod/CPAN::Meta::Spec#Relationships
Show quoted text
> Now, when I see some functionality described as an 'Experimental > feature', my assumption is that it is turned OFF by default and that > if I want to use it I have to type some code that turns it ON. For > example, if in perl-5.32, I want to use the 'lexical_subs' feature, I > have to say: "use experimental 'lexical_subs';". > > 'suggests_policy' is turned OFF by default, but 'recommends_policy' is > turned on. Granted, you do have that statement there say that > 'recommends' modules should be installed except where resources don't > permit. But you don't explicitly say that this is turned ON by > default (which I would guess means that 'y' is the default choice in > the installation script).
CPAN.pm's defaults for these values are correct, with respect to the CPAN Meta Specification.
Show quoted text
> In simple terms, 'cpanm' DWIMs.
..but, actually, is less conformant to the specification. CPAN clients *should* attempt to install all 'recommends' prerequisites by default, but any installation failure encountered downstream of that attempt should not constitute an overall failure in the installation of the original distribution. This work still needs to be done in both CPAN.pm and cpanminus. cpanminus does not attempt to install recommended prerequisites at all (by default). CPAN.pm does, but failures encountered on that path result in overall failures when they should not. Simply altering the value of the default is not a proper fix -- the real fix is much more complicated than that.
Subject: Re: [rt.cpan.org #133205] Experimental 'recommends_policy' option, turned on by default, leads to surprises for users
Date: Fri, 21 Aug 2020 14:30:58 -0400
To: bug-CPAN@rt.cpan.org, jkeenan@cpan.org
From: James E Keenan <jkeenan@pobox.com>
On 8/21/20 2:22 PM, Karen Etheridge via RT wrote:
Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=133205 > > > On 2020-08-21 11:13:40, JKEENAN wrote: >
>> This man page provides no further documentation of these policies. >> One has to go deeper into the distribution, to lib/CPAN/FirstTime.pm, >> to find a more complete description:
> > The documentation for the 'recommends' and 'suggests' properties of > distribution metadata is documented here: https://metacpan.org/pod/CPAN::Meta::Spec#Relationships >
>> Now, when I see some functionality described as an 'Experimental >> feature', my assumption is that it is turned OFF by default and that >> if I want to use it I have to type some code that turns it ON. For >> example, if in perl-5.32, I want to use the 'lexical_subs' feature, I >> have to say: "use experimental 'lexical_subs';". >> >> 'suggests_policy' is turned OFF by default, but 'recommends_policy' is >> turned on. Granted, you do have that statement there say that >> 'recommends' modules should be installed except where resources don't >> permit. But you don't explicitly say that this is turned ON by >> default (which I would guess means that 'y' is the default choice in >> the installation script).
> > CPAN.pm's defaults for these values are correct, with respect to the CPAN Meta Specification. >
>> In simple terms, 'cpanm' DWIMs.
> > ..but, actually, is less conformant to the specification. > > CPAN clients *should* attempt to install all 'recommends' prerequisites by default, > but any installation failure encountered downstream of that attempt should not > constitute an overall failure in the installation of the original distribution. > This work still needs to be done in both CPAN.pm and cpanminus. cpanminus does not > attempt to install recommended prerequisites at all (by default). CPAN.pm does, but > failures encountered on that path result in overall failures when they should not. > > Simply altering the value of the default is not a proper fix -- the > real fix is much more complicated than that. > > >
Would you be able to provide a shell one-liner that I could run immediately after installing a perl executable that would set 'recommends_policy' the way I prefer it? Thank you very much. Jim Keenan
On 2020-08-21 11:31:11, jkeenan@pobox.com wrote:
Show quoted text
> > Would you be able to provide a shell one-liner that I could run > immediately after installing a perl executable that would set > 'recommends_policy' the way I prefer it?
I don't generally use CPAN.pm. Surely it's just a matter of finding the config file and performing a search/replace on the appropriate line to alter the configuration value.
Subject: Re: [rt.cpan.org #133205] Experimental 'recommends_policy' option, turned on by default, leads to surprises for users
Date: Sat, 22 Aug 2020 06:40:43 +0200
To: "Karen Etheridge via RT" <bug-CPAN@rt.cpan.org>
From: Andreas Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
Show quoted text
>>>>> On Fri, 21 Aug 2020 14:22:32 -0400, "Karen Etheridge via RT" <bug-CPAN@rt.cpan.org> said:
Show quoted text
> CPAN clients *should* attempt to install all 'recommends' prerequisites by default, > but any installation failure encountered downstream of that attempt should not > constitute an overall failure in the installation of the original distribution. > This work still needs to be done in both CPAN.pm and cpanminus. cpanminus does not > attempt to install recommended prerequisites at all (by default). CPAN.pm does, but > failures encountered on that path result in overall failures when they should not.
From the Changes file: : 2019-05-31 k <andk@cpan.org> : : * release 2.27-TRIAL : : * bugfix: under certain circumstances, failing dependencies via : recommends and suggests could abort a build; this is now fixed -- andreas


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.