NAME
00-lib-check.t - the lib-locating BEGIN block in every test
DESCRIPTION
Every test starts with the same BEGIN block. It walks up $0 to the t directory, replaces it with lib, and dies if that is not a directory. If lib is a symlink it must resolve to the lib next to the physical t directory, so code outside the checkout is not loaded. It adds lib to @INC unless lib or a blib is already there.
The layout tests run this file's copy of the block in a probe script against real, symlinked, outside, dangling, and missing lib directories. The consistency tests check that every test file, and the 02-perl_t template, holds an identical copy.
SEE ALSO
t/lib/FindBin/Testy.pm, which applies the same checks for the generated test groups.