Skip Menu |

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 18061
Status: resolved
Priority: 0/
Queue: CPAN

People
Owner: ANDK [...] cpan.org
Requestors: RMBarker [...] cpan.org
Cc:
AdminCc:

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



Subject: CPAN::Config not loaded if CPAN/MyConfig.pm found
I use(d) a CPAN/MyConfig.pm that modifies the values set by CPAN::Config and I don't use C<o conf commit> to write CPAN/MyConfig.pm. This worked because (up to 1.86_51) CPAN::Config was always C<require>d whether or not there was a CPAN/MyConfig.pm to be loaded. In 1.86_52, with the introduction of CPAN::HandleConfig, CPAN::Config is not required if a CPAN/MyConfig.pm is loaded. There is an obvious work-around for me: add C<require CPAN::Config> at the top of CPAN/MyConfig.pm. But it took along time to find the problem. Give that normal use of the *Config.pm files in 1.87, I can see there is no point in requiring CPAN::Config before CPAN::MyConfig. So all I ask is some documentation of this change, perhaps even in the changes to perl when CPAN-1.87 is included in a release.
Subject: Re: [rt.cpan.org #18061] CPAN::Config not loaded if CPAN/MyConfig.pm found
Date: Sun, 12 Mar 2006 15:15:33 +0100
To: bug-CPAN [...] rt.cpan.org
From: andreas.koenig.gmwojprw [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Wed, 8 Mar 2006 09:19:50 -0500 (EST), " via RT" <bug-CPAN@rt.cpan.org> said:
Show quoted text
> Wed Mar 08 09:19:50 2006: Request 18061 was acted upon. > Transaction: Ticket created by RMBARKER > Queue: CPAN > Subject: CPAN::Config not loaded if CPAN/MyConfig.pm found > Owner: Nobody > Requestors: RMBARKER@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=18061 >
Show quoted text
> I use(d) a CPAN/MyConfig.pm that modifies the values set by CPAN::Config > and I don't use C<o conf commit> to write CPAN/MyConfig.pm. This worked > because (up to 1.86_51) CPAN::Config was always C<require>d whether or > not there was a CPAN/MyConfig.pm to be loaded.
Show quoted text
> In 1.86_52, with the introduction of CPAN::HandleConfig, CPAN::Config is > not required if a CPAN/MyConfig.pm is loaded. There is an obvious > work-around for me: add C<require CPAN::Config> at the top of > CPAN/MyConfig.pm. But it took along time to find the problem.
Show quoted text
> Give that normal use of the *Config.pm files in 1.87, I can see there is > no point in requiring CPAN::Config before CPAN::MyConfig. So all I ask > is some documentation of this change, perhaps even in the changes to > perl when CPAN-1.87 is included in a release.
I'm sorry for that major inconvenince for you. I believe, the behaviour of CPAN/Config.pm vs. CPAN/MyConfig.pm was always underspecified and probably inconsistent. Right now it is more consistent, I believe, because it is pulled together into a single sub require_myconfig_or_config, but still not well documented. This must be done before the next release. See also ticket 18011, where Vassilii gave me further hints on improving the situation. -- andreas
I hope that 1.87 or 1.88 documented the MyConfig options clearly enough and that the cleaner code and API around it will help more people to get a quick and safe escort to their own configuration, Sorry again & Thanks for the report!