in reply to Re: use lib "."
in thread use lib "."

G'day philipbailey,

"I'm a bit surprised that nobody has so far mentioned FindBin, ..."

++ That's a reasonable comment.

I'm a long-time user of FindBin but have always been somewhat put off by its "KNOWN ISSUES" section.

I recently came across Perl::Critic::Policy::Community::DiscouragedModules. Its FindBin section mentions issues and provides a number of alternatives. My earlier post in this thread, 'Re: use lib "."', shows use of one of those.

— Ken

Replies are listed 'Best First'.
Re^3: use lib "."
by philipbailey (Curate) on Aug 12, 2023 at 16:49 UTC
    Yes, FindBin has some global behaviours that don't work well in persistent environments where it could be use'd multiple times. But for simple cases like production or test scripts, there's no problem.