Skip Menu |

This queue is for tickets about the PAR-Repository CPAN distribution.

Report information
The Basics
Id: 23527
Status: rejected
Priority: 0/
Queue: PAR-Repository

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

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



Subject: MSWin32 compatibility with Win32::Symlink
Despite the fact that Perl built under native Win32 environment (like ActivePerl) doesn't have symlink support, this support is provided by NT-based operation systems (like Win2k/XP/2003), and Win32::Symlink can be used as workaround on NTFS filesystem. Attached patch adds Win32::Symlink usage for PAR::Repository when it runs on $^O eq 'MSWin32' and has 'cl' as C Compiler in Config.pm (to avoid using under Cygwin environment, where 'gcc' is used). Sadly I found no functionality tests included in distributive, so I cannot be sure about absolutely correct work, but it should. -- Serguei Trouchelle
Subject: PAR-Repository-1.14-Win32.patch
--- S:\prj\CPAN\builds\PAR-Repository-0.14\Makefile.PL Sun Oct 29 14:35:06 2006 +++ S:\prj\CPAN\builds\PAR-Repository-0.14-W32\Makefile.PL Tue Nov 21 19:54:24 2006 @@ -3,6 +3,21 @@ # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. +use Config; + +my @addprereq; + +if ($^O eq 'MSWin32' and $Config{'cc'} eq 'cl') { # Cygwin's gcc should work fine + eval { require Win32::Symlink; }; + if ($@) { + warn "Using this module under native MSWin32 environment requires\nWin32::Symlink module.\n\n"; + } else { + use Win32::Symlink; + } + @addprereq = 'Win32::Symlink' => '0.04'; +} + + if (not $ENV{IGNORE_SYMLINK_WARNINGS} and not eval {symlink("", ""); 1;}) { warn <<'HERE'; Your system does not support creation of symbolic links. @@ -35,6 +50,7 @@ 'Pod::Text' => '0', 'ExtUtils::Manifest' => '0', 'PAR::Repository::Query' => '0.12', + @addprereq, }, # e.g., Module::Name => 1.1 EXE_FILES => [ 'bin/parrepo', --- S:\prj\CPAN\builds\PAR-Repository-0.14\lib\PAR\Repository.pm Sat Nov 04 23:47:41 2006 +++ S:\prj\CPAN\builds\PAR-Repository-0.14-W32\lib\PAR\Repository.pm Tue Nov 21 20:05:26 2006 @@ -14,6 +14,11 @@ use Archive::Zip qw//; use File::Temp qw//; use version qw//; +use Config; + +if ($^O eq 'MSWin32' and $Config{'cc'} eq 'cl') { + use Win32::Symlink; +} use base qw/ PAR::Repository::Zip
Subject: Re: [rt.cpan.org #23527] MSWin32 compatibility with Win32::Symlink
Date: Tue, 21 Nov 2006 20:34:49 +0100
To: bug-PAR-Repository [...] rt.cpan.org
From: Steffen Mueller <rt8363b02 [...] sneakemail.com>
Hi, Serguei Trouchelle via RT schrieb: Show quoted text
> Despite the fact that Perl built under native Win32 environment (like > ActivePerl) doesn't have symlink support, this support is provided by > NT-based operation systems (like Win2k/XP/2003), and Win32::Symlink can > be used as workaround on NTFS filesystem. > > Attached patch adds Win32::Symlink usage for PAR::Repository when it > runs on $^O eq 'MSWin32' and has 'cl' as C Compiler in Config.pm (to > avoid using under Cygwin environment, where 'gcc' is used).
I didn't know about Win32::Symlink. I'll look at it! (And of course, at your patch!) Show quoted text
> Sadly I found no functionality tests included in distributive, so I > cannot be sure about absolutely correct work, but it should.
Well, yes. It's a shame I never wrote extensive tests. Sorry. :( I'll address this asap, but that might mean it has to wait until about Christmas. Steffen
On Tue Nov 21 13:19:59 2006, STRO wrote: Show quoted text
> Despite the fact that Perl built under native Win32 environment (like > ActivePerl) doesn't have symlink support, this support is provided by > NT-based operation systems (like Win2k/XP/2003), and Win32::Symlink can > be used as workaround on NTFS filesystem. > > Attached patch adds Win32::Symlink usage for PAR::Repository when it > runs on $^O eq 'MSWin32' and has 'cl' as C Compiler in Config.pm (to > avoid using under Cygwin environment, where 'gcc' is used). > > Sadly I found no functionality tests included in distributive, so I > cannot be sure about absolutely correct work, but it should.
Hi again, unfortunately, Win32::Symlink works only for directories. Hence it is not suitable for PAR::Repository. Your idea was good, but it's not going to work. Audrey's Win32::Symlink needs to mention that in the docs :/ I'm marking the ticket as rejected. Steffen