in reply to perllocal EXE_FILES and %Config

Things listed in EXE_FILES will be copied to the INST_SCRIPT directory. To answer your question, no, they're not the same on all builds/configs. The defaults using the OS perl on CachyOS:

perl -MConfig -e 'foreach (sort keys %Config) { print "$_ => $Config{$ +_}\n" if /bin|script/ }' bin => /usr/bin bin_ELF => define binexp => /usr/bin d_vendorbin => define d_vendorscript => define installbin => /usr/bin installscript => /usr/bin/core_perl installsitebin => /usr/bin installsitescript => /usr/bin/site_perl installusrbinperl => installvendorbin => /usr/bin installvendorscript => /usr/bin/vendor_perl ld_can_script => define scriptdir => /usr/bin/core_perl scriptdirexp => /usr/bin/core_perl sitebin => /usr/bin sitebinexp => /usr/bin sitescript => /usr/bin/site_perl sitescriptexp => /usr/bin/site_perl vendorbin => /usr/bin vendorbinexp => /usr/bin vendorscript => /usr/bin/vendor_perl vendorscriptexp => /usr/bin/vendor_perl

You can specify where you want these exe files to be copied:

perl Makefile.PL INSTALLSCRIPT=/opt/mybin #cpanm cpanm --make-args "INSTALLSCRIPT=/opt/mybin" Module::Name

You could use your perlbrew configure stage to specify different paths for your perl builds if desired.

Replies are listed 'Best First'.
Re^2: perllocal EXE_FILES and %Config
by Anonymous Monk on May 08, 2026 at 18:37 UTC
    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: