Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I noticed some inconsistent entries in perllocal for modules that have EXE_FILES:

Acme::MetaSyntactic (script/ is typical)
EXE_FILES: script/meta script/metafy

Pod::Parser
EXE_FILES: scripts/podselect

CGI-Kwiki
EXE_FILES: inc/SCRIPTS/kwiki-install

GD
EXE_FILES: bdf_scripts/bdf2gdfont.pl

App::FatPacker (bin/ is typical too)
EXE_FILES: bin/fatpack

Despite all that, everything listed as EXE_FILES ends up in the same directory, specified (on my system) by 12 %Config variables with the same exact value as $Config{bin}:

/Users/u/perl5/perlbrew/perls/perl-5.42.0/bin

My question is this: do these 12 Config variables have the same value on all Perl installations? I guess there are actually 14 of these same vars, but the vendor values are blank on my system.

Here's a little script to check. I'd like to know if these can be different values so I know which one(s) to use. Thanks in advance.

#!/usr/bin/perl -l # Check if all the bin and script dirs in %Config are the same. use strict; use warnings; use Config; @_ = qw/bin binexp initialinstalllocation installbin installscript installsitebin installsitescript scriptdir scriptdirexp sitebin sitebinexp sitescript sitescriptexp vendorbin vendorbinexp/; printf "%-24s %-100s\n", $_, $Config{$_} for @_;
Output on my system:
bin                       /Users/u/perl5/perlbrew/perls/perl-5.42.0/bin                                                    
binexp                    /Users/u/perl5/perlbrew/perls/perl-5.42.0/bin                                                    
initialinstalllocation    /Users/u/perl5/perlbrew/perls/perl-5.42.0/bin                                                    
installbin                /Users/u/perl5/perlbrew/perls/perl-5.42.0/bin                                                    
installscript             /Users/u/perl5/perlbrew/perls/perl-5.42.0/bin                                                    
installsitebin            /Users/u/perl5/perlbrew/perls/perl-5.42.0/bin                                                    
installsitescript         /Users/u/perl5/perlbrew/perls/perl-5.42.0/bin                                                    
scriptdir                 /Users/u/perl5/perlbrew/perls/perl-5.42.0/bin                                                    
scriptdirexp              /Users/u/perl5/perlbrew/perls/perl-5.42.0/bin                                                    
sitebin                   /Users/u/perl5/perlbrew/perls/perl-5.42.0/bin                                                    
sitebinexp                /Users/u/perl5/perlbrew/perls/perl-5.42.0/bin                                                    
sitescript                /Users/u/perl5/perlbrew/perls/perl-5.42.0/bin                                                    
sitescriptexp             /Users/u/perl5/perlbrew/perls/perl-5.42.0/bin                                                    
vendorbin                                                                                                                     
vendorbinexp                                            

Replies are listed 'Best First'.
Re: perllocal EXE_FILES and %Config
by marto (Cardinal) on May 08, 2026 at 12:44 UTC

    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.

      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: