The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Changes for version 2.11 - 2014-09-02

  • "append" causes appends array exports from multiple searches using the same variable to append (vs. overwrite) their values. default is old behavior (i.e., "noappend" which overwrites).
  • e.g., from t/10*t:
    • FindBin::libs->import ( qw ( base=foo subdir=etc subonly export=etc append ) ); FindBin::libs->import ( qw ( base=bar subdir=etc subonly export=etc append ) );
  • generates:
    • Second pass looks for bar/etc:[
    • '/sandbox/lembark/Modules/FindBin-libs/foo/etc',
    • '/sandbox/lembark/Modules/FindBin-libs/bar/etc'
    • ]
  • Main use is finding, say, multiple ./etc dir's and exporting them all into a search list for config files.
  • Given:
    • ./myproj/etc ./shared/etc
  • then #! code in ./myproj/bin could:
    • use FindBin::libs qw( export base=etc ); use FindBin::libs qw( export base=shared subdir=etc subonly );
  • and get @etc of ( .../myproj/etc, .../shared/etc ).
  • The old behavior, 'noappend' overwrites the variable (which can be handy for re-setting the dirs also).

Documentation

locate and a 'use lib' or export directories based on $FindBin::Bin.
stable version of code for older perl installations.

Modules

locate and a 'use lib' or export directories based on $FindBin::Bin.