On 10/5/24 5:39 PM, John Ralls wrote:

As I explained in my previous, cpan needs to write to /Library/
Perl/3.40/, a system directory, so it need to be run with sudo. Of
course doing that causes the ownership of ~/.cpan to be root.

John,

I *know* how CPAN works. Typically the default MyConfig.pm (~/.cpan/CPAN/MyConfig.pm) will use sudo for the "make_install_make_command" and "mbuild_install_build_command" commands. This allows cpan to write to the system directories needed. But a user's ~/.cpan tree should always be writable by the user. Running "sudo cpan ..." ends up making a mess of user's cpan directory and leaves files and directories the user cannot write to, and BF's issue trying to run "cpan Finance::Quote" is an example. I assumed the install FQ tool supplied with GnuCash did not run "sudo cpan" and instead depended on sudo being called to execute the install. I can assure you, most long time Perl monks would chastise those who execute "sudo cpan".

https://stackoverflow.com/questions/9409888/when-using-cpan-in-linux-ubuntu-should-i-run-it-using-sudo-as-root-or-as-my-de

I'm guessing the FQ install tool uses "sudo cpan" to avoid issues where users may have changed their cpan config from the default. But again, this could lead to other problems. Example if someone had set their cpan config to build into $PERL5LIB, typically under their $HOME and done to avoid needing root privs. Running "sudo cpan ..." in that case would install root owned modules in a directory space the user expects to own everything underneath.
_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to