in reply to Precedence in @INC

If you use lib that should give your path precedence as it is the equivalent to
BEGIN { unshift @INC, 'your/path/here' }
And because @INC is read from left-to-right/bottom-to-top this will mean that perl will look in your path first.
HTH

_________
broquaint

Replies are listed 'Best First'.
Re: Precedence in @INC
by Abigail-II (Bishop) on May 19, 2003 at 22:22 UTC
    Why the unshifting inside a BEGIN block if you could use the lib module as well?

    Abigail

      Why the unshifting inside a BEGIN block if you could use the lib module as well?
      Er - it is the equivalent to, as in, that's basically what lib does (as the docs say), I figured that snippet might make it more obvious what lib achieves.
      HTH

      _________
      broquaint

      A 'use' statement is executed at compile time, so any 'use lib' is just like an @INC modification in a BEGIN block. He's right, they're essentially equivalent. The 'use lib' is a little more hands-free convenient and safe, especially with 'no lib' support, but otherwise he's just saying they're doing the same thing.

      --
      [ e d @ h a l l e y . c c ]