NAME

25-libs-abspath.t - verify FindBin::libs abspath/noabspath walk-root selection

DESCRIPTION

Tests that FindBin::libs respects the abspath/noabspath import option when choosing between $Bin_p (physical, symlinks resolved) and $Bin_l (logical, symlinks preserved) as the directory-walk root.

A temporary directory tree is built:

$tmp/projects/app/bin/   <- physical bin
$tmp/projects/lib/       <- found by abspath walk only
$tmp/home/lib/           <- found by noabspath walk only
$tmp/home/app            <- symlink -> ../projects/app

The driver script is written to $tmp/projects/app/bin/driver.pl and invoked as $tmp/home/app/bin/driver.pl (through the symlink). This produces $Bin_l = $tmp/home/app/bin and $Bin_p = $tmp/projects/app/bin, causing each walk to find a distinct lib/ subtree.

The test is skipped on MSWin32, which does not support directory symlinks in the same way.

SEE ALSO

FindBin::libs, FindBin::Bin