I edited /usr/lib/perl5/5.8/CPAN.pm and worked fine (hope I didn't
break anything else :S). Just wrapped $file between ' char. The diff:
--- /usr/lib/perl5/5.8/CPAN.pm.org 2008-04-08 12:47:32.773732600
-0300
+++ /usr/lib/perl5/5.8/CPAN.pm 2008-04-08 12:45:44.999609700 -0300
@@ -5809,7 +5809,7 @@
$system = "$CPAN::Config->{gzip} --decompress --stdout " .
"< $file | $CPAN::Config->{tar} xvf -";
} else {
- $system = "$CPAN::Config->{tar} xvf $file";
+ $system = "$CPAN::Config->{tar} xvf '$file'";
}
if (system($system) != 0) {
# people find the most curious tar binaries that cannot
handle
@@ -5823,7 +5823,7 @@
}
$file = $ungzf;
}
- $system = "$CPAN::Config->{tar} xvf $file";
+ $system = "$CPAN::Config->{tar} xvf '$file'";
$CPAN::Frontend->myprint(qq{Using Tar:$system:\n});
if (system($system)==0) {
$CPAN::Frontend->myprint(qq{Untarred $file successfully
\n});
My CPAN version is v1.7602 and Perl version is 5.8.8.
On Mar 21, 6:37 pm, [EMAIL PROTECTED] (Siegfried Heintze) wrote:
> Quite some time ago, someone suggested that if I was using cygwin perl
> instead of activestate perl, I could use some additional features (not
> available in activestate) concerning the control of cron jobs.
>
> So I am using cygwin perl which does not give you the option of installing
> elsewhere.
>
> But that is not the problem anyway because there are no spaces in
> c:\cygwin\lib\perl5 (the location where perl is installed, I think).
>
> The problem is either hardcoded in CPAN.pm or in some little file in ~/.
> Something is probably expanding $HOME and not quoting the result. I looked in
> CPAN.pm but could not figure out where it is untaring it. I looked in ~/ for
> a configuration file with no luck.
>
> Is there a place to log a bug with CPAN?
>
> Gunnar: I tried your suggestion and that worked for Date::Manip but I was
> quickly overwhelmed with DateTime as there were many dependencies to download
> first.
> Brian: I see you are the author of CPAN. Do you have any suggestions? Scroll
> way down for the log where I reproduce it on windows/cygwin.
> Thanks,
> Siegfried
>
> -----Original Message-----
> From: Bob McConnell [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 20, 2008 1:08 PM
> To: Siegfried Heintze (Aditi); [EMAIL PROTECTED]
> Subject: RE: FW: How to install Date::Manip on cygwin perl?
>
> Normally the installer will show "C:\Program Files\ActiveState\Perl", or
> something similar as the location where it will put the package. I
> change that to "D:\perl" before proceding. The entire tree, including
> CPAN will be installed at that location. You may have to remove the
> package and reinstall it to get this done. Don't forget to save off
> anything you have written or added before you do that. I don't know how
> careful the installer is about cleaning up after itself. You may have to
> reboot after the install to get all of the search paths set up
> correctly. I didn't have to fiddle with anything in the MS-Windows setup
> afterwards. It just worked.
>
> Bob McConnell
>
> -----Original Message-----
> From: Siegfried Heintze (Aditi) [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 20, 2008 3:32 PM
> To: [EMAIL PROTECTED]
> Subject: RE: FW: How to install Date::Manip on cygwin perl?
>
> Ah! Good idea! How do I do that with CPAN?
>
> -----Original Message-----
> From: Bob McConnell [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 18, 2008 12:46 PM
> To: Gunnar Hjalmarsson; [EMAIL PROTECTED]
> Subject: RE: FW: How to install Date::Manip on cygwin perl?
>
> I have always avoided the "Program Files" default directory when
> installing anything with a Unix flavor to it. For Perl, everything gets
> installed at "D:\perl", just to avoid this problem. Even Microsoft
> applications don't all know how to handle paths with spaces. It was not
> one of their better innovations.
>
> Bob McConnell
>
> -----Original Message-----
> From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 18, 2008 3:37 PM
> To: [EMAIL PROTECTED]
> Subject: Re: FW: How to install Date::Manip on cygwin perl?
>
> Siegfried Heintze (Aditi) wrote:
> > It looks like the CPAN program does not anticipate paths with spaces
> > in them.
>
> So it seems. You may want to try other methods to install the module.
>
> cd c:/temp/temp/temp/
> perl -MCPAN -e 'install DateTime'
> CPAN: Storable loaded ok
> Going to read /cygdrive/c/Documents and Settings/a-siehei/.cpan/Metadata
> Database was generated on Thu, 20 Mar 2008 10:30:58 GMT
> Running install for module DateTime
> Running make for D/DR/DROLSKY/DateTime-0.42.tar.gz
> CPAN: Digest::MD5 loaded ok
> CPAN: Compress::Zlib loaded ok
> Checksum for /cygdrive/c/Documents and
> Settings/a-siehei/.cpan/sources/authors/id/D/DR/DROLSKY/DateTime-0.42.tar.gz
> ok
> Scanning cache /cygdrive/c/Documents and Settings/a-siehei/.cpan/build for
> sizes
> sh: /cygdrive/c/Documents: No such file or directory
> /usr/bin/tar: This does not look like a tar archive
> /usr/bin/tar: Error exit delayed from previous errors
> Uncompressed /cygdrive/c/Documents and
> Settings/a-siehei/.cpan/sources/authors/id/D/DR/DROLSKY/DateTime-0.42.tar.gz
> successfully
> Using Tar:/usr/bin/tar xvf /cygdrive/c/Documents and
> Settings/a-siehei/.cpan/sources/authors/id/D/DR/DROLSKY/DateTime-0.42.tar:
> /usr/bin/tar: /cygdrive/c/Documents: Cannot open: No such file or directory
> /usr/bin/tar: Error is not recoverable: exiting now
> Couldn't untar /cygdrive/c/Documents and
> Settings/a-siehei/.cpan/sources/authors/id/D/DR/DROLSKY/DateTime-0.42.tar
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/