in reply to Re: Precedence in @INC
in thread Precedence in @INC

Why the unshifting inside a BEGIN block if you could use the lib module as well?

Abigail

Replies are listed 'Best First'.
Re: Re: Precedence in @INC
by broquaint (Abbot) on May 19, 2003 at 22:31 UTC
    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

Re: Re: Precedence in @INC
by halley (Prior) on May 19, 2003 at 22:53 UTC
    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 ]