Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: pecho [...] belwue.de
Cc:
AdminCc:

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



Subject: Bug in CPAN::Mini::Inject::Config::parse_config() : trailing whitespaces in config file lines not cut
Date: Mon, 22 Jul 2013 14:10:10 +0200
To: bug-cpan-mini-inject [...] rt.cpan.org
From: Wolfgang Pecho <pecho [...] belwue.de>
Hi there ! Found a minor bug in CPAN::MIni::Inject 0.32. In CPAN::Mini::Inject::Config::parse_config() parsing config lines is done in 160 while ( <$fh> ) { 161 next if /^\s*#/; 162 $self->{$1} = $2 if /([^:\s]+)\s*:\s*(.*)$/; 163 delete $required{$1} if defined $required{$1}; 164 } A config line like : 'local: test_cpan ' results in $1: 'local' $2: 'test_cpan ' which gives a path to a local cpan directory with trainling white spaces. The trailing white spaces should be removed. Solution: Replace regex /([^:\s]+)\s*:\s*(.*)$/ by /([^:\s]+)\s*:\s*(.*?)\s*$/ or cut off the trailing whitespaces in $2 before assigning it. Thanks in advance Wolfgang
Thanks a lot for the report and fix. A new release has been uploaded to CPAN and will be on a mirror near to you soon. :)