Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 67752
Status: new
Priority: 0/
Queue: CPANPLUS

People
Owner: Nobody in particular
Requestors: dchilton+cpan [...] bestmail.us
Cc:
AdminCc:

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



Subject: feature request: module filters/exclusions for normal 'cpanp' operations (e.g., upgrades)
Date: Mon, 25 Apr 2011 14:31:16 -0700
To: bug-cpanplus [...] rt.cpan.org
From: dchilton+cpan [...] bestmail.us
cpan2dist provides the ability to ignore modules, using --ban* & --ignore* options. currently, cpanp itself does not provide a mechanism for doing the same. e.g., if I've installed from source Spamassassin, it installs in @INC paths the Mail::SpamAssassin::* modules. its installed modules lack correct/consistent version strings, resulting @ 'cpanp -o', in 'unparseable' errors, e.g.: Show quoted text
> cpanp
CPANPLUS::Shell::Default -- CPAN exploration and module installation (v0.9104) *** Please report bugs to <bug-cpanplus@rt.cpan.org>. *** Using CPANPLUS::Backend v0.9104. ReadLine support enabled. *** Type 'p' now to show start up log CPAN Terminal> o [MSG] Checking if source files are up to date [MSG] Retrieving /root/.cpanplus/sourcefiles.s2.25.c0.9104.stored 1 Unparsable Mail::SpamAssassin::Conf JMASON 2 Unparsable Mail::SpamAssassin::Plugin FELICITY CPAN Terminal> I don't want those managed by CPANP, or in any other way than manually, in this case. it would be useful to add to a CPANP config file (/usr/lib/perl5/5.12.3/CPANPLUS/Config/System.pm ? something separately maintained ?) a list of modules -- spec'd in similar regex form to that used by cpan2dist --band & --ignore -- to be simply ignored @ update. in the meantime, here's an exchange captured @ irc w/ jiboumans for a DIY-approach: [14:08] <jiboumans> ---------------------------------- there's a callback mechanism in cpanplus that you can use. it's what cpan2dist does http://cpansearch.perl.org/src/BINGOS/CPANPLUS-0.9104/bin/cpan2dist look for: ### register install callback ### $cb->_register_callback( name => 'filter_prereqs', code => \&__filter_prereqs, ); i'm thinking if it's possible using a CPANPLUS::Config::Foo module <jiboumans> you have access to the configure object, but not to a backend object. but since those are singletons.. *thinking* it's worth a shot so try this: create a cpanplus::config::foo modlue in your path, define a setup function and it will get called with the config object create a new backend object there with taht config object, install the callback (print hello world or something) -- should work that would make it work transparently for anyone using cpanp the use case was, in the day, stuff that couldn't be packaged, but holding back versions does seem like a very useful feature ----------------------------------