in reply to RE (tilly) 2: my first module
in thread my first module

Can anybody think of advantages to the "push @INC" move here and the more familiar
use lib 'foo/bar/bletch';

?

Philosophy can be made out of anything -- or less

Replies are listed 'Best First'.
RE (tilly) 4: my first module
by tilly (Archbishop) on Oct 07, 2000 at 03:08 UTC
    Well with lib you are saying that directory is the *first* place to look for modules, with push you are saying it is the last. Sometimes you might want that control.

    I once had to deal with a Perl system that didn't know where its libraries were, manipulating @INC in a BEGIN block was what got me out of that. OTOH if you know about PERL5LIB (which I do now and didn't then) then that is easy enough to fix.

    So yes, I can think of uses. But none that I would cause me to recommend manipulating @INC rather than using lib.