Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Best strategy to facilitate dependency installation for a Perl-based software distribution

by hermida (Scribe)
on Nov 13, 2011 at 22:14 UTC ( #937838=note: print w/ replies, xml ) Need Help??


in reply to Best strategy to facilitate dependency installation for a Perl-based software distribution

Ok so I've gone the route of including all non-CORE and non-XS dependencies bundled in an extlib in my distribution to make things as easy as possible for people trying to install the software, looks to be a good way.

When I started building the extlib in my development environment using cpanm -L extlib <module> etc I realized that cpanm installs everything in a local::lib compatible way, meaning everything doesn't go starting at extlib but rather extlib/lib/perl5. Therefore I would have to use local::lib "$FindBin::Bin/../extlib" in my programs instead of use lib "$FindBin::Bin/../extlib" to get use the dependencies in extlib but this brings a chicken-or-egg problem, local::lib in not in CORE :-(

Is there something I'm not thinking right here? I don't want to make to have to make an external dependency that people have local::lib already installed in their Perl tree (which could require administrator access)


Comment on Re: Best strategy to facilitate dependency installation for a Perl-based software distribution
Select or Download Code
Re^2: Best strategy to facilitate dependency installation for a Perl-based software distribution
by Anonymous Monk on Nov 14, 2011 at 02:51 UTC

    Is there something I'm not thinking right here?

    I think so :)

    If the route you have chosen is to bundle all non-CORE dependencies, and local::lib is not core, why can't you bundle local::lib?

      Sorry if I wasn't clear, its because one needs to use local::lib "$FindBin::Bin/../extlib" to be able to include and use these bundled dependencies therefore local::lib cannot be bundled

        Sorry if I wasn't clear, its because one needs to use local::lib "$FindBin::Bin/../extlib" to be able to include and use these bundled dependencies therefore local::lib cannot be bundled

        ??

        Maybe you want to study local::lib a little closer?

        $ perl Makefile.PL purchasing clue ... Checking if your kit is complete... Looks good Writing Makefile for ... Writing MYMETA.yml and MYMETA.json $ make test ... $ make install ... Installing /home/username/perl5/lib/perl5/bin/clue $ cat /home/username/perl5/lib/perl5/bin/clue #!/usr/bin/perl -- use lib '/home/username/perl5/lib/perl5/i386-linux', '/home/username/perl5/lib/perl5', ; use MyClues; MyClues->run; __END__ $ perl -I$HOME/perl5/lib/perl5 -Mlocal::lib -e 1 export PERL_MB_OPT='--install_base /home/username/perl5' export PERL_MM_OPT='INSTALL_BASE=/home/username/perl5' export PERL5LIB='/home/username/perl5/lib/perl5/i386-linux:/home/use +rname/perl5/lib/perl5' export PATH="/home/username/perl5/bin:$PATH" $ echo 'eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)' >>~/.bashrc

        Now this clue preparation can be generating scripts/clue from template, it can "bootstrapping" local::lib, or instructing your users to append to bashrc

        I don't see a problem

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://937838]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (15)
As of 2015-07-07 15:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (90 votes), past polls