in reply to Re: How to lay out private modules?
in thread How to lay out private modules?

Something you could use instead of use lib is the PERL5LIB environment variable...

They are exactly the same thing. One is on a per-user basis and the other is on a per-file basis. Which you use is dependent on your needs. Generally, 'use lib' is preferred precisely because it's user-independent.

  • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
  • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"

Replies are listed 'Best First'.
Re^3: How to lay out private modules?
by Animator (Hermit) on May 11, 2005 at 18:26 UTC

    Well, not exactly the same...

    If you move the script when you have 'use lib' then you might need to change the script... (ofcourse this is not true when the path of the modules-directory is relative to the path of the script path, but that's not always the case)

    And ofcourse one can argue wheter or not user-independene is required... if many users are using it then it might be better to put it in a INC-dir (in a subdirectory ofcourse)

    It all depends on one needs... which is why I mentioned it, since not everyone might know about the variable... (which would indicate that they didn't read (or skipped some parts) of the perlrun POD...)