in reply to Re: perllocal EXE_FILES and %Config
in thread perllocal EXE_FILES and %Config

Thank you marto! Your output is intriguing. It looks to me like your scripts from CPAN modules are probably all installed by default to /usr/bin/site_perl (sitescript) OR I guess possibly /usr/bin (sitebin). Assuming you have LWP installed what does "which lwp-request" say on your system?

Is there one specific %Config var where cpan clients always put scripts regardless of what it says in EXE_FILES?

Thanks for pointing out the options for INSTALLSCRIPT. I guess that throws a monkey wrench at the idea of reliably finding EXE_FILES in the %Config directories! I wonder if the value of perllocal EXE_FILES reflects a custom value for INSTALLSCRIPT?

For example if you do this:

cpanm --make-args "INSTALLSCRIPT=/opt/mybin" Module::Name
Does perllocal look like this:
EXE_FILES: /opt/mybin/module-name-script
I woke up this morning are realized I could turn off perlbrew to check the values for system Perl on macos (v5.30.3):
bin                       /usr/bin                                                                                            
binexp                    /usr/bin                                                                                            
initialinstalllocation    /usr/bin                                                                                            
installbin                /usr/bin                                                                                            
installscript             /usr/bin                                                                                            
installsitebin            /usr/local/bin                                                                                      
installsitescript         /usr/local/bin                                                                                      
scriptdir                 /usr/bin                                                                                            
scriptdirexp              /usr/bin                                                                                            
sitebin                   /usr/local/bin                                                                                      
sitebinexp                /usr/local/bin                                                                                      
sitescript                /usr/local/bin                                                                                      
sitescriptexp             /usr/local/bin                                                                                      
vendorbin                 /usr/local/bin                                                                                      
vendorbinexp              /usr/local/bin                                                                                      
vendorscript              /usr/local/bin                                                                                      
vendorscriptexp           /usr/local/bin
PS - I missed vendorscript and vendorscriptexp in my test script:
#!/usr/bin/perl -l # Check if all the bin and script dirs in %Config are the same. # Updated to include vendorscript and vendorscriptexp use strict; use warnings; use Config; @_ = qw/bin binexp initialinstalllocation installbin installscript installsitebin installsitescript scriptdir scriptdirexp sitebin sitebinexp sitescript sitescriptexp vendorbin vendorbinexp vendorscript vendorscriptexp/; printf "%-24s %-100s\n", $_, $Config{$_} for @_;