[rt.cpan.org #65052] Cannot create ADODB.Connection object under Cygwin

[email protected] ("Reini Urban via RT")
Newsgroups perl.libwin32
Message-ID <[email protected]>
Wed Feb 08 12:56:59 2012: Request 65052 was acted upon.
Transaction: Correspondence added by RURBAN
       Queue: Win32-OLE
     Subject: Cannot create ADODB.Connection object under Cygwin
   Broken in: 0.1709
    Severity: Important
       Owner: Nobody
  Requestors: 0
      Status: resolved
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=65052 >


Second patch attached, for the preferred version to copy the whole ENV 
when someones requests use Win32.
We don't want the full ENV in pure cygwin, only on use Win32.

-- 
Reini Urban
0001-initialize-cygwin-on-use-Win32-with-full-ENV-for-ADO.patch (text/x-patch, 697 B)
From 043609d47bfadc9ff3000f77df24d4dc891739d6 Mon Sep 17 00:00:00 2001
From: Reini Urban <[email protected]>
Date: Wed, 8 Feb 2012 11:49:09 -0600
Subject: [PATCH] initialize cygwin on use Win32 with full ENV for ADODB

---
 cpan/Win32/Win32.pm |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/cpan/Win32/Win32.pm b/cpan/Win32/Win32.pm
index d37352a..c6c6121 100644
--- a/cpan/Win32/Win32.pm
+++ b/cpan/Win32/Win32.pm
@@ -560,6 +560,10 @@ sub _GetOSName {
 local $^W = 0;
 bootstrap Win32;
 
+# On cygwin copy the whole ENV for certain win32 programs, 
+# e.g. ADODB needs %COMMONPROGRAMFILES%
+Win32::SyncCygwinWin32Env() if $^O eq 'cygwin';
+
 1;
 
 __END__
-- 
1.7.5.4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.