Subject: | yactool --test fails to retrieve RECENT uploads on Win32 |
On two separate Win32 machines (both Strawberry perl), I found that
yactool --test fails with the following error:
Hostname required when fetching from 'http' at
D:/strawberry/perl/site/lib/CPANPLUS/YACSmoke.pm line 370
Can't call method "fetch" on an undefined value at
D:/strawberry/perl/site/lib/CPANPLUS/YACSmoke.pm line 371.
The problem seems to be in how the URL for the RECENT file is created,
on lines 366..368 of YACSmoke.pm. The resulting URL is:
http://cpan.strawberryperl.com\RECENT
This seems to be caused by the 'catdir' call translating the path to use
windows directory separators. Simply concatenating the server+path+file
resolves the problem.
my $remote = $hosts->[$h_ind]->{scheme} . '://' .
$hosts->[$h_ind]->{host} .
$hosts->[$h_ind]->{path} . RECENT_FILE;
My environment:
Distribution = CPANPLUS-YACSmoke-0.62
Perl version = 5.12.3 on MSWin32-x64-multi-thread and MSWin32-x86-multi-
thread
OS: Windows 7 SP1 64-bit, Windows XP 32-bit (I'd have to check the SP
level, if that's important)