in reply to Re: Local library for module test script (updated FindBin)
in thread Local library for module test script

LanX :) a relative path is relative, with cwd() usually being dist-name-version, and the "module.pm" living in dist-name-version/t/ adding "." wouldn't change anything , require lib.pm would still fail
  • Comment on Re^2: Local library for module test script

Replies are listed 'Best First'.
Re^3: Local library for module test script
by LanX (Saint) on Dec 03, 2014 at 04:20 UTC
    Anonymous Monk, I tested  use lib '.'!

    (at least I thought :)

    I supposed that lib takes the file's path as base.

    The perldoc wasn't clear¹, so I tested by changing the working directory with chdir before use and it seemed to work fine.

    But now I am realizing that I should have put the chdir into a BEGIN block, otherwise it happens too late.

    So your point is valid!!!

    Cheers Rolf

    (addicted to the Perl Programming Language and ☆☆☆☆ :)

    ¹) but led me now to FindBin