Skip Menu |

This queue is for tickets about the Perl-Dist-Vanilla CPAN distribution.

Report information
The Basics
Id: 20979
Status: resolved
Priority: 0/
Queue: Perl-Dist-Vanilla

People
Owner: Nobody in particular
Requestors: daxim [...] cpan.org
Cc:
AdminCc:

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



Subject: CPAN's o conf init/FirstTime.pm: trailing backslash in cpan_home directory path
During initial manual configuration of CPAN, when asked the question CPAN build and cache directory? answer with a path with a trailing backslash, e.g. C:\vanilla- perl\.cpan\ Later exit and try to restart CPAN: Show quoted text
> cpan
CPAN: File::HomeDir loaded ok Error while requiring CPAN::Config: Can't find string terminator "]" anywhere before EOF at C:/vanilla- perl/perl/lib/CPAN/Config.pm line 13. Compilation failed in require at C:/vanilla-perl/perl/site/lib/CPAN/ HandleConfig.pm line 385. Show quoted text
> head -13 C:/vanilla-perl/perl/lib/CPAN/Config.pm|tail -1
'cpan_home' => q[C:\vanilla-perl\.cpan\], The trailing backslash escapes the delimiter and creates a syntax error. This is always reproducable for the latest release of CPAN: Show quoted text
> perl -MCPAN -e"print $CPAN::VERSION"
1.8755 Patch for FirstTime.pm follows: --- FirstTime.pm~ Sun Jul 23 16:15:06 2006 +++ FirstTime.pm Mon Aug 14 11:19:19 2006 @@ -140,6 +140,10 @@ . "or directory is not writable. Please retry.\n"; } } + { + local $/ = '\\'; # single backslash + chomp $ans; # remove trailing backslash if existent + } $CPAN::Config->{cpan_home} = $ans; $CPAN::Frontend->myprint($prompts{keep_source_where});
This has been patched in the CPAN.pm repository. The next release of CPAN.pm (1.88_56?) will resolve this issue. The Vanilla Perl Build 8 roadmap includes updating CPAN.pm to the latest development version, so this should be fixed in the next release cycle.