der has asked for the wisdom of the Perl Monks concerning the following question:
I'm looking for a CPAN module that will put the directory from $0 onto @INC. It's a trivial bit of code, yes, but I hate to replicate it all over the place. (And of course, I can't re-use that code without getting something onto @INC first (the admins at most shops won't let me put stuff into system directories).)
I'm okay with mandating a directory on every user's PATH, but I like to keep things as simple as possible and not rely on trying to get PERL5LIB set in every user's env. My philosophy is that if you can run the program, it should just run.
Does some form of this exist, or some other elegant solution I've overlooked?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: @INC from $0 (FindLib)
by tye (Sage) on Jul 24, 2015 at 02:17 UTC | |
by der (Initiate) on Jul 24, 2015 at 04:35 UTC | |
Re: @INC from $0
by dave_the_m (Monsignor) on Jul 24, 2015 at 08:59 UTC | |
Re: @INC from $0
by BrowserUk (Patriarch) on Jul 24, 2015 at 01:14 UTC | |
by Anonymous Monk on Jul 24, 2015 at 01:48 UTC | |
by BrowserUk (Patriarch) on Jul 24, 2015 at 01:51 UTC | |
by Anonymous Monk on Jul 24, 2015 at 01:54 UTC | |
by Discipulus (Canon) on Jul 24, 2015 at 07:51 UTC | |
| |
by Anonymous Monk on Jul 24, 2015 at 02:33 UTC | |
Re: @INC from $0
by Anonymous Monk on Jul 24, 2015 at 01:47 UTC |
Back to
Seekers of Perl Wisdom