[Edinburgh-pm] Embarrassingly n00bish question

Robert Rothenberg robrwo at gmail.com
Sat Jul 9 02:53:59 PDT 2011

If it's your own workstation, then why not just install the Perl
modules using MakeMaker or Mobule::Build? (The are usually installed
in /usr/local, so won't interfere with your distro's Perl modules or
core ones.)

Otherwise, there are ways to install libraries in a local ~/lib
directory. Search Google.

may also be  useful.

On Fri, Jul 8, 2011 at 9:38 PM, Miles Gould <miles at assyrian.org.uk> wrote:
> Hi everyone,
> I've got a script, which I of course wrote in Perl. I now want to
> re-use some code from it in another script, so I've started to do what
> I should have done in the first place and factored the guts out into a
> library. That library needs to be visible to the calling scripts:
> what's the best way of ensuring this?
> Currently, my situation is this:
> 1) The scripts live in a git repo in ~/src/monkey/simga.
> 2) The module lives in ~/src/monkey/simga/lib/Sim/GA.pm.
> 3) Tests... yeah, that would be a good idea.
> 4) ~/lib/perl5/Sim is a symlink to ~/src/monkey/simga/lib/Sim.
> 5) ~/bin contains symlinks to the scripts.
> 6) ~/lib/perl5 is added to PERL5LIB by my .bashrc.
> 7) Similarly, ~/bin is added to PATH.
> [It''s a genetic algorithm that simulates an embedded processor
> running benchmarks as its fitness function, in order to tune compiler
> parameters. Hence "Sim::GA", and my angry tweets about genetic quanta
> and simulators that think the way to handle SIGTERMs is to drop into a
> debug prompt. ~/src/monkey started out as a directory for small
> throwaway scripts: as was probably inevitable, it's where most of my
> code now lives.]
> This situation is no doubt terrible in even more ways than I've worked
> out for myself. Surely there must be a Better Way. So, how do you all
> handle this situation? What awesome tools should I be using to manage
> my dists? What should I read to better understand how Perl dists are
> meant to work?
> TIA,
> Miles.
> _______________________________________________
> Edinburgh-pm mailing list
> Edinburgh-pm at pm.org
> http://mail.pm.org/mailman/listinfo/edinburgh-pm

More information about the Edinburgh-pm mailing list