Skip Menu |
 

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 40891
Status: open
Priority: 0/
Queue: CPANPLUS

People
Owner: Nobody in particular
Requestors: ohollmen [...] broadcom.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: CPANPLUS - Getting PREFIX=.. effective via API
Hi ! Thanks for the wonderful CPANPLUS Api. I'm creating big-scale automation for maintaining large set of modules for a corporate environment. I've got 2 questions, first critical and second nice-to-have: - Shell: setenv PERL_MM_OPT "/home/...." and Perl: BEGIN {$ENV{'PERL_MM_OPT'} = "PREFIX=/home/....";} do solve the setting of PREFIX for experimental installs under /home/, but is there any cleaner "Api way" to set the alternative module install location. CPANPLUS::Configure seems to come close to this, but I just couldn't find a way reading the docs or by looking at source. - Is there any DBI based way (Generic DBI or DBD::Sqlite for example) for the bookkeeping of module metadata in the dev. pipeline ? Maybe some loosely coupled system outside CPANPLUS modules would be best at least for the starters. If the project produces such system as a side effect, are you interested in seeing the module ? Looking forward to hearing about the nicer way of setting the custom module install path ! With best regards, Olli Hollmen
Hi Olli, Sorry, your mail fell through the cracks. I've added it to the bug tracker so it gets the attention it deserves. Show quoted text
> Thanks for the wonderful CPANPLUS Api. I'm creating big-scale automation > for maintaining large set of modules for a corporate environment. > I've got 2 questions, first critical and second nice-to-have: > > - Shell: setenv PERL_MM_OPT "/home/...." and Perl: BEGIN > {$ENV{'PERL_MM_OPT'} = "PREFIX=/home/....";} do solve the setting of > PREFIX for experimental installs under /home/, but is there any cleaner > "Api way" to set the alternative module install location. > CPANPLUS::Configure seems to come close to this, but I just couldn't > find a way reading the docs or by looking at source.
Yes, you can set both makemaker flags and module::build flags using CPANPLUS::Configure. Here's how: $conf = $cb->configure_object; $conf->set_conf( makemakerflags => '....' ); $conf->set_conf( buildflags => '....' ); Since installing in homedirs is common place, i'm looking to add a feature to cpanplus that just lets you say 'install in my homedir' without having the user worry about flags. Show quoted text
> - Is there any DBI based way (Generic DBI or DBD::Sqlite for example) > for the bookkeeping of module metadata in the dev. pipeline ? Maybe some > loosely coupled system outside CPANPLUS modules would be best at least > for the starters. If the project produces such system as a side effect, > are you interested in seeing the module ?
Actually, the dev release has support for an sqlite backend. I'd be thrilled if you took it for a spin and tell me how it works for you. You'll need the latest dev release here: http://search.cpan.org/~kane/CPANPLUS-0.85_04/ And then enable the sqlite backend by setting the source_engine: # from the default shell s conf source_engine CPANPLUS::Internals::Source::SQLite s save # from the API $conf->set_conf( source_engine => 'CPANPLUS::Internals::Source::SQLite' ); $conf->save; It all works fine on my box; it lowers the ram consumption by a lot, and doesn't slow down too much in speed. Let me know how it works for you! Cheers, -- Jos
CC: "Abdul Khalid" <abdul.khalid [...] broadcom.com>
Subject: RE: [rt.cpan.org #40891] CPANPLUS - Getting PREFIX=.. effective via API
Date: Thu, 13 Nov 2008 18:00:11 -0800
To: "bug-CPANPLUS [...] rt.cpan.org" <bug-CPANPLUS [...] rt.cpan.org>
From: "Olli Hollmen" <ohollmen [...] broadcom.com>
Download (untitled) / with headers
text/plain 2.6k
Hi Jos ! Thanks for the API Info and the cool Sqlite backend experiment. I'll surely try it out. I'll let you know how stuff works. Olli P.S: Hope I'm not responding to any world-wide perl audience, but I guess little advertising for your new cool CPANPLUS features does not hurt :-) Show quoted text
-----Original Message----- From: Jos Boumans via RT [mailto:bug-CPANPLUS@rt.cpan.org] Sent: Thursday, November 13, 2008 6:05 AM To: Olli Hollmen Subject: [rt.cpan.org #40891] CPANPLUS - Getting PREFIX=.. effective via API <URL: http://rt.cpan.org/Ticket/Display.html?id=40891 > Hi Olli, Sorry, your mail fell through the cracks. I've added it to the bug tracker so it gets the attention it deserves.
> Thanks for the wonderful CPANPLUS Api. I'm creating big-scale > automation for maintaining large set of modules for a corporate environment. > I've got 2 questions, first critical and second nice-to-have: > > - Shell: setenv PERL_MM_OPT "/home/...." and Perl: BEGIN > {$ENV{'PERL_MM_OPT'} = "PREFIX=/home/....";} do solve the setting of > PREFIX for experimental installs under /home/, but is there any > cleaner "Api way" to set the alternative module install location. > CPANPLUS::Configure seems to come close to this, but I just couldn't > find a way reading the docs or by looking at source.
Yes, you can set both makemaker flags and module::build flags using CPANPLUS::Configure. Here's how: $conf = $cb->configure_object; $conf->set_conf( makemakerflags => '....' ); $conf->set_conf( buildflags => '....' ); Since installing in homedirs is common place, i'm looking to add a feature to cpanplus that just lets you say 'install in my homedir' without having the user worry about flags.
> - Is there any DBI based way (Generic DBI or DBD::Sqlite for example) > for the bookkeeping of module metadata in the dev. pipeline ? Maybe > some loosely coupled system outside CPANPLUS modules would be best at > least for the starters. If the project produces such system as a side > effect, are you interested in seeing the module ?
Actually, the dev release has support for an sqlite backend. I'd be thrilled if you took it for a spin and tell me how it works for you. You'll need the latest dev release here: http://search.cpan.org/~kane/CPANPLUS-0.85_04/ And then enable the sqlite backend by setting the source_engine: # from the default shell s conf source_engine CPANPLUS::Internals::Source::SQLite s save # from the API $conf->set_conf( source_engine => 'CPANPLUS::Internals::Source::SQLite' ); $conf->save; It all works fine on my box; it lowers the ram consumption by a lot, and doesn't slow down too much in speed. Let me know how it works for you! Cheers, -- Jos


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.