in reply to Re: my first module
in thread my first module

I think he really meant @ISA.

The purpose is to inherit import from Exporter, so that when someone use's your module they get stuff imported correctly from your namespace.

For modules with procedural stuff, that is usually the right way to do things.

UPDATE
Oops, I just saw the "push" line. You are right, that doesn't make sense to me either. blush

Replies are listed 'Best First'.
RE: RE (tilly) 2: my first module
by arturo (Vicar) on Oct 07, 2000 at 02:40 UTC
    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

      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.