Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Module::Install and Debian packages

by dpavlin (Friar)
on Mar 13, 2008 at 14:53 UTC ( #673987=note: print w/replies, xml ) Need Help??


in reply to Re: Module::Install and Debian packages
in thread Module::Install and Debian packages

To make this diff really small, I don't care. If system fails, Module::AutoInstall will install module from CPAN (because it's not installed by system).

However, this approach has few problems: you might need to remove inc/ directory so that M::I will re-create it with this changes, and it will download only Debian packages which are required by current module (one which you did perl Makefile.PL for) and not for dependencies. So, let's move this idea at better place -- into Module::AutoInstall:

--- /usr/share/perl5/Module/AutoInstall.pm 2007-10-31 11:34:27.0000 +00000 +0000 +++ AutoInstall.pm 2008-03-13 14:48:31.000000000 +0000 @@ -6,7 +6,7 @@ use vars qw{$VERSION}; BEGIN { - $VERSION = '1.03'; + $VERSION = '1.04'; } # special map on pre-defined feature sets @@ -287,7 +288,10 @@ push @installed, $pkg; } else { - push @modules, $pkg, $ver; + my $deb = 'lib' . lc($pkg) . '-perl'; + $deb =~ s/::/-/g; + eval { system "sudo apt-get install $deb" }; + push @modules, $pkg, $ver if $@; } }
I bumped $VERSION in hope that system-wide version will be picked before local version in inc/ directory.

I would love to make this proper M::I module, but I'm afraid I don't have a clue where to start.


2share!2flame...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://673987]
help
Chatterbox?
[marto]: hey Corion, how's tricks?
[Corion]: marto: Currently all well - work is even OK currently ;) I should start translating my WWW::Mechanize:: Chrome talk to English and recheck that my demos all work, but I have two weeks for that still :)
[Corion]: So, most things are looking good :-D
[Corion]: I should write some more code for my Jekyll clone, but I don't feel like it, so maybe I should just let that linger instead ;)

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2017-07-26 10:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (390 votes). Check out past polls.