Skip Menu |

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 133214
Status: open
Priority: 0/
Queue: CPAN

People
Owner: Nobody in particular
Requestors: fabrice-ducos [...] orange.fr
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: cpan lists entries unrelated to Perl (including restricted entries) at least on OSX systems
Date: Sat, 22 Aug 2020 09:40:55 +0200
To: bug-CPAN [...] rt.cpan.org
From: Fabrice Ducos <fabrice-ducos [...] orange.fr>
Greetings, I have observed a weird behaviour of the cpan (not cpanm) command on a MacOSX system (my exact version is 10.15.3, but I think it should be easily reproducible with any recent enough OSX system). When I want to list the Perl modules installed by cpan on my system, the loop ends up trying to access Pictures and other System folders unrelated to Perl. The OS informs me (by a popup window) that the application is trying to access restricted folders, and here is what happens when I dutifully refuse (I colorized the output for clarity). Not sure if this bug is already known or reported, but I don’t think it’s the intended behaviour for such a ubiquitous (and still extremely useful) tool. Best regards A long time Perl enthusiast $ uname -a Darwin macbook-pro-de-fabrice-2.home 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64 $ which cpan /usr/bin/cpan $ which cpanm /Users/ducos/perl5/bin/cpanm $ cpan --version /usr/bin/cpan version 1.61 calling Getopt::Std::getopts (version 1.07 [paranoid]), running under Perl version 5.18.4. [Now continuing due to backward compatibility and excessive paranoia. See 'perldoc Getopt::Std' about $Getopt::Std::STANDARD_HELP_VERSION.] Nothing to install! $ cpan -l [cpan output skipped for brevity] PAR::SetupProgname 1.002 PAR::SetupTemp 1.002 PAR::Heavy 0.12 PAR::Dist 0.49 Convert::TNEF 0.18 Convert::BinHex 1.123 Convert::ASN1 0.26 Convert::ASN1::_decode 0.26 Convert::ASN1::IO 0.26 Convert::ASN1::parser 0.26 Convert::ASN1::Debug 0.26 Convert::ASN1::_encode 0.26 SQL::Abstract 1.77 SQL::Abstract::Tree undef SQL::Abstract::Test undef SQL::Translator::Producer::DBIx::Class::File 0.1 SQL::Translator::Parser::DBIx::Class 1.10 Can't opendir(/Users/ducos/Pictures/Photos Library.photoslibrary): Operation not permitted at /System/Library/Perl/5.18/App/Cpan.pm line 1216. Can't opendir(/Users/ducos/Library/Application Support/CallHistoryTransactions): Operation not permitted at /System/Library/Perl/5.18/App/Cpan.pm line 1216. Can't opendir(/Users/ducos/Library/Application Support/com.apple.sharedfilelist): Operation not permitted at /System/Library/Perl/5.18/App/Cpan.pm line 1216. Can't opendir(/Users/ducos/Library/Application Support/com.apple.TCC): Operation not permitted at /System/Library/Perl/5.18/App/Cpan.pm line 1216. Can't opendir(/Users/ducos/Library/Application Support/FileProvider): Operation not permitted at /System/Library/Perl/5.18/App/Cpan.pm line 1216. Can't opendir(/Users/ducos/Library/Application Support/AddressBook): Operation not permitted at /System/Library/Perl/5.18/App/Cpan.pm line 1216. Can't opendir(/Users/ducos/Library/Application Support/CallHistoryDB): Operation not permitted at /System/Library/Perl/5.18/App/Cpan.pm line 1216. Can't opendir(/Users/ducos/Library/Autosave Information): Operation not permitted at /System/Library/Perl/5.18/App/Cpan.pm line 1216. Can't opendir(/Users/ducos/Library/IdentityServices): Operation not permitted at /System/Library/Perl/5.18/App/Cpan.pm line 1216. Can't opendir(/Users/ducos/Library/Calendars): Operation not permitted at /System/Library/Perl/5.18/App/Cpan.pm line 1216. Can't opendir(/Users/ducos/Library/Messages): Operation not permitted at /System/Library/Perl/5.18/App/Cpan.pm line 1216. Can't opendir(/Users/ducos/Library/HomeKit): Operation not permitted at /System/Library/Perl/5.18/App/Cpan.pm line 1216. Can't opendir(/Users/ducos/Library/Sharing): Operation not permitted at /System/Library/Perl/5.18/App/Cpan.pm line 1216. Can't opendir(/Users/ducos/Library/Mail): Operation not permitted at /System/Library/Perl/5.18/App/Cpan.pm line 1216. Can't opendir(/Users/ducos/Library/Safari): Operation not permitted at /System/Library/Perl/5.18/App/Cpan.pm line 1216. Can't opendir(/Users/ducos/Library/Suggestions): Operation not permitted [more cpan output (skipped)] Downloads::servers::slapd::SampleLDAP 1.01 Downloads::src::util::t_array undef Downloads::src::util::t_bimap undef Downloads::src::util::t_tsenum undef Downloads::src::util::ktemplate undef Downloads::src::util::t_template undef Downloads::src::util::t_enum undef Downloads::src::lib::crypto::crypto_tests::CRC undef Downloads::src::lib::crypto::crypto_tests::Poly undef $

Message body is not shown because it is too large.

Subject: Re: [rt.cpan.org #133214] cpan lists entries unrelated to Perl (including restricted entries) at least on OSX systems
Date: Sat, 22 Aug 2020 11:57:40 +0200
To: "Fabrice Ducos via RT" <bug-CPAN [...] rt.cpan.org>
From: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
Show quoted text
>>>>> On Sat, 22 Aug 2020 03:41:08 -0400, "Fabrice Ducos via RT" <bug-CPAN@rt.cpan.org> said:
Show quoted text
> When I want to list the Perl modules installed by cpan on my system, > the loop ends up trying to access Pictures and other System folders > unrelated to Perl. The OS informs me (by a popup window) that the > application is trying to access restricted folders, and here is what > happens when I dutifully refuse (I colorized the output for > clarity).
Help requested from other users of CPAN.pm who use it on OSX. This may have something to do with the module File::HomeDir. One simple thing to try out would be to disable File::HomeDir from loading, like so: % cpan Show quoted text
cpan> o conf dontload_list push 'File::HomeDir' cpan> o conf commit cpan> quit
To revert that, you would run: % cpan Show quoted text
cpan> o conf dontload_list pop cpan> o conf commit cpan> quit
HTH, Regards, -- andreas
cpan -l searches for modules in @INC. @INC includes the current directory until perl 5.26. Since you are running cpan -l from your home directory, it is searching your entire home directory, including Pictures, Library, etc.