Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CPAN-Mini CPAN distribution.

Report information
The Basics
Id: 55274
Status: resolved
Priority: 0/
Queue: CPAN-Mini

People
Owner: Nobody in particular
Requestors: jkeen [...] verizon.net
Cc:
AdminCc:

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



Subject: config_file() method: its documentation is at variance with the way it is used
While doing further exploration of another RT for this distribution (https://rt.cpan.org/Ticket/Display.html?id=55272), I installed the most recent version of CPAN-Mini on a different box. Inside the read_config() method, I see that the config_file() method is called like this: sub read_config { my ($class, $options) = @_; my $config_file = $class->config_file($options); ... } So it's called in scalar context, which makes sense. When I look at the code for config_file(), I see that the method returns a scalar if the config file is found and an empty list if it doesn't: sub config_file { my ($class, $options) = @_; ... return ( (defined $config_file && -e $config_file) ? $config_file : () ); } However, the *documentation* for config_file() suggests that the method returns a *hash*: config_file my %config = CPAN::Mini->config_file( { options } ); This is confusing. Thank you very much. Jim Keenan
Thanks! Fixed by e2b465a -- rjbs