Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 11376
Status: resolved
Priority: 0/
Queue: CPANPLUS

People
Owner: Nobody in particular
Requestors: cpan [...] jbisbee.com
Cc:
AdminCc:

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



Subject: CPANPLUS/Config.pm should not be created if an alternate location is chosen (ie ~/.cpanplus/config)
Right now during the configure process if you opt to have the config some place other than CPANPLUS/Config.pm. CPANPLUS/Config.pm-orig is still copied over to CPANPLUS/Config.pm. The problem with this is that even though you are warned to set PERL5_CPANPLUS_CONFIG to the location of your config file, cpanplus loads the contents of CPANPLUS/Config.pm-orig instead (which doesn't contain your customizations and will break) I found this issue when I set the config to be located under .cpanplus during 'perl Makefile.PL' and when I did the "make test" step, everything was fine until t/20_CPANPLUS-Dist-MM.t when it tested the location of 'make' and failed because it used the contents of Config.pm-orig and not the alternate config we created. Also at the end of the "perl Makefile.PL" step the it might be nice to remind stupid people like me to maybe run PERL5_CPANPLUS_CONFIG=/home/jbisbee/.cpanplus/config make test In short this will save folks from run cpanplus with the generic config they didn't setup.
[JBISBEE - Thu Feb 3 23:59:52 2005]: Show quoted text
> Right now during the configure process if you opt to have the config > some place other than CPANPLUS/Config.pm. CPANPLUS/Config.pm-orig > is still copied over to CPANPLUS/Config.pm. The problem with this > is that even though you are warned to set PERL5_CPANPLUS_CONFIG to > the location of your config file, cpanplus loads the contents of > CPANPLUS/Config.pm-orig instead (which doesn't contain your > customizations and will break) > > I found this issue when I set the config to be located under .cpanplus > during 'perl Makefile.PL' and when I did the "make test" step, > everything was fine until t/20_CPANPLUS-Dist-MM.t when it tested > the location of 'make' and failed because it used the contents of > Config.pm-orig and not the alternate config we created.
I've applied this patch -- the failures will now be *much more* apparent, as it will not find any suitable config in your cpanplus extraction dir anymore: ==== //depot/cpanplus/devel/Makefile.PL#85 - /Users/kane/sources/p4/cpanplus/ devel/Makefile.PL ==== 162a163,164 Show quoted text
> my $require = -e $lc ? $lc : $lc . '-orig'; >
165,168c167,170 < unless( $HasOld ) { < copy( $lc.'-orig', $lc ) < or die loc("Cannot write to %1", $lc ); < } --- Show quoted text
> #unless( $HasOld ) { > # copy( $lc.'-orig', $lc ) > # or die loc("Cannot write to %1", $lc ); > #}
174c176,183 < { local $^W; require $lc; } --- Show quoted text
> { local $^W; > require $require; > > ### we may have loaded from -orig, means we have to prented we > ### loaded .pm as well > $INC{'CPANPLUS/Config.pm'} = $INC{'CPANPLUS/Config.pm-orig'} > if $require ne $lc; > }
Show quoted text
> Also at the end of the "perl Makefile.PL" step the it might be nice to > remind stupid people like me to maybe run > > PERL5_CPANPLUS_CONFIG=/home/jbisbee/.cpanplus/config make test > > In short this will save folks from run cpanplus with the generic > config they didn't setup.
That's there already... a few times... with sleeps in between... :)