Dear Geeks redux
Sep. 8th, 2010 01:36 pmThis is a question that's plagued me for ten years. I don't there's "an" answer, but I'm sure there are interesting opinions, and perhaps a canonical "best practice".
Code I'm working on is, of course, split into libraries and scripts. Let us, for argument's sake, say I have ~/code/perl/MyProject/. Traditionally, I have had ~/code/perl/MyProject/bin and ~/code/perl/MyProject/libs , and maybe also docs, config, etc. This means one of two things. Either I add 'use lib ...' to everything in that project, and perhaps a 'use lib' for utils libs I've done in the past, and maybe to a custom termcontroller to abstract curses ... etc. Or, I have PERL5LIB = ~/code/perl/libs, and add a symlink under libs for each new project. Both have their ups and downs (and of course, Python has the same issue).
Which do you do? Or do you have some other way of dealing with it?
Code I'm working on is, of course, split into libraries and scripts. Let us, for argument's sake, say I have ~/code/perl/MyProject/. Traditionally, I have had ~/code/perl/MyProject/bin and ~/code/perl/MyProject/libs , and maybe also docs, config, etc. This means one of two things. Either I add 'use lib ...' to everything in that project, and perhaps a 'use lib' for utils libs I've done in the past, and maybe to a custom termcontroller to abstract curses ... etc. Or, I have PERL5LIB = ~/code/perl/libs, and add a symlink under libs for each new project. Both have their ups and downs (and of course, Python has the same issue).
Which do you do? Or do you have some other way of dealing with it?