in reply to Re^3: 'do' command is dead? Surely not?
in thread 'do' command is dead? Surely not?
Recent versions of Perl (v5.24.1+) removed '.' from @INC, so this is probably right on the mark. If the OP is using a recent enough Perl version it will not look in the dot path unless something like this happens:
use lib '.';
Though that is subject to the challenges that the dot path has always faced. It would be better to do something like this:
use FindBin; use lib "$FindBin::Bin/../lib"; # Or whatever is accurate for this scr +ipt's needs.
This eliminates sensitivity to where the script was invoked from.
See also: FindBin, lib, and perl5241delta.
Dave
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: 'do' command is dead? Surely not?
by haukex (Archbishop) on May 19, 2017 at 16:27 UTC | |
by ACI (Acolyte) on May 19, 2017 at 17:13 UTC | |
Re^5: 'do' command is dead? Surely not?
by syphilis (Archbishop) on May 20, 2017 at 09:49 UTC | |
Re^5: 'do' command is dead? Surely not?
by ACI (Acolyte) on May 19, 2017 at 14:57 UTC | |
Re^5: 'do' command is dead? Surely not?
by KurtZ (Friar) on May 19, 2017 at 14:53 UTC | |
by tobyink (Canon) on May 19, 2017 at 15:09 UTC | |
by KurtZ (Friar) on May 19, 2017 at 15:53 UTC | |
by Anonymous Monk on May 19, 2017 at 17:58 UTC | |
by Corion (Patriarch) on May 19, 2017 at 18:33 UTC | |
by Anonymous Monk on May 19, 2017 at 18:38 UTC | |
| |
by dasgar (Priest) on May 19, 2017 at 18:24 UTC | |
by KurtZ (Friar) on May 19, 2017 at 21:44 UTC |
In Section
Seekers of Perl Wisdom