Skip Menu |

This queue is for tickets about the Win32 CPAN distribution.

Report information
The Basics
Id: 76368
Status: open
Priority: 0/
Queue: Win32

People
Owner: Nobody in particular
Requestors: bulk88 [...] hotmail.com
Cc:
AdminCc:

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



Subject: rewrote Win32
The Win32 library's XS code looked very bloated to me. So I rewrote it. I also added delay loading of DLLs in VC and GCC (Perl on VC delay loads Winsock already, so its been done before). Apply it to a copy of Win32 0.44. My version I labeled as 0.45. Changes file doesn't have a date for my entry. I also added alot of new tests. I ran the new tests again 0.44 and they all passed (I think). The 0.44 tests dont pass on Windows ME. My tests passed on Windows ME. Test suite was run on WinXP and WinME. Compiling combinations I tested it with were x86 ActivePerl 5.10, x86 homebrewed VC Perl 5.12, x86 Strawberry 5.12, x64 ActivePerl 5.14, x64 Strawberry 5.14. x86 non Strawberry Perls were VC 2003. x64 non Strawberry Perls were VC 2008. Note Cygwin is missing from the list. So I have no idea if my patch will compile on Cygwin. Strawberry Perls were whatever GCC they came with. The code authors of my patch is me and some public domain code, verified with author. The license of my patch is same as perl I guess. Can you apply it or is there something things I need to fix? My only design idea I didn't implement is making the mini C DLL importer (called getImports in the code) available to other XS libraries to use. I dont know if its worth it.
Subject: Win32.0.45.patch

Message body is not shown because it is too large.

Subject: RE: [rt.cpan.org #76368] rewrote Win32
Date: Thu, 24 May 2012 15:12:32 -0700
To: <bug-Win32 [...] rt.cpan.org>
From: "Jan Dubois" <jand [...] activestate.com>
On Sat, 07 Apr 2012, patcat via RT wrote: Sorry for the long delay; I've been traveling for a month and am just catching up with some things. Show quoted text
> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=76368 > > > The Win32 library's XS code looked very bloated to me. So I rewrote it.
Thank you for your effort! I would like to split up your big patch into several smaller ones, each with just a single purpose. Ideally you would create a serious of commits on github and just issue a pull request against: https://github.com/jandubois/win32 However, for some parts of your patch I need some convincing that they are correct/necessary: +0.45 [2012-??-??] + - massive refactoring, to reduce code bloat, DLL is 24KB vs 33KB in + 0.44, using 32bit Perl 5.10 on VC 2003, with default -01 I'm not concerned about "bloat" when the total size is just 33KB. Reducing the size is fine, but should not be done at the cost of making the code harder to maintain. Which part of your patch is responsible for the size reduction? + - removed the CRT I don't understand the point of this. Perl itself already loads in a CRT, so why wouldn't we use it? Having code that is part of the CRT repeated in the module seems like bloat to me. :) + - mentioned the GetLastError is always invalid bug ok + - mentioned 32KB Unicode path support is untested It can be mentioned, but there are a lot of issues with Unicode filename support in Perl for Windows. The general status of Unicode support in the Win32::* modules is quite a mess. Maybe we should discuss this in a separate thread on the mailing list. + - mentioned what does return a valid last error ok + - added delay loading of version.dll and ole32.dll on VC and GCC Perl ok + - compiles with PERL_CORE now Compiling modules with PERL_CORE is just wrong. Only code that goes into perl5xx.dll should ever be compiled with PERL_CORE. I understand that some modules would define PERL_CORE anyways because using it gave you a speed advantage. This speed advantage no longer exists in 5.14 and later. So I don't want to support the misuse of PERL_CORE in Win32, given that it would only benefit unsupported legacy releases of Perl. + - fixed GetCurrentThreadId tests that were broken on DOS Windows ok. I don't particularly care to keep Win9X compatibility in future Win32 releases (because it will stand in the way of improving Unicode support), but am fine with small changes to keep it working on Win9X for now. + - fixed handle leak in Spawn thanks! I'm also happy to apply your improvements to the regression tests. Let me know if you want to provide them in a separate patch, or if I should just extract them from current one! Cheers, -Jan
From: bulk88(1) [...] hotmail.com

Message body is not shown because it is too large.

From: bulk88(1) [...] hotmail.com
any updates?
Subject: RE: [rt.cpan.org #76368] rewrote Win32
Date: Fri, 8 Jun 2012 16:41:19 -0700
To: <bug-Win32 [...] rt.cpan.org>
From: "Jan Dubois" <jand [...] activestate.com>
On Thu, 07 Jun 2012, bulk88 via RT wrote: Show quoted text
> > Queue: Win32 > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=76368 > > > any updates?
Sorry, it will take me a bit longer to split your patch into individual parts and apply the ones I indicated are acceptable. I'll be YAPC::NA next week and won't be able to look at it until I'm back. Cheers, -Jan
From: bulk88(1) [...] hotmail.com
On Fri Jun 08 19:41:26 2012, jand@ActiveState.com wrote: Show quoted text
> Sorry, it will take me a bit longer to split your patch into > individual parts and apply the ones I indicated are acceptable. > > I'll be YAPC::NA next week and won't be able to look at it > until I'm back. > > Cheers, > -Jan > >
I would prefer for this ticket to come to a timely conclusion. 2 months have passed since I opened it. I understand Win32 is a big and important module for Perl on Windows. Correct me if I'm wrong, but I am getting the impression that you are not comfortable in such radical changes to the old Win32. Please tell me whether you are planning to only use the bug fixes, test suite, and POD and exclude the optimizations. If so, I will fork my rewrite on CPAN. I would rather not have the code languish forever in RT.
Subject: RE: [rt.cpan.org #76368] rewrote Win32
Date: Mon, 11 Jun 2012 18:40:27 -0700
To: <bug-Win32 [...] rt.cpan.org>
From: "Jan Dubois" <jand [...] activestate.com>
On Fri, 08 Jun 2012, bulk88 via RT wrote: Show quoted text
> > I would prefer for this ticket to come to a timely conclusion. 2 months > have passed since I opened it. I understand Win32 is a big and important > module for Perl on Windows. Correct me if I'm wrong, but I am getting > the impression that you are not comfortable in such radical changes to > the old Win32. Please tell me whether you are planning to only use the > bug fixes, test suite, and POD and exclude the optimizations. If so, I > will fork my rewrite on CPAN. I would rather not have the code languish > forever in RT.
Yes, I'm not comfortable including the code that duplicates functionality from the C runtime library. It is not clear to me how this would be an improvement or optimization. Feel free to create a fork with these changes if they are important to you. Cheers, -Jan