RE: New Package Available: perl-libwin32-0.191-1
"Rafael Kitover" <[email protected]> Fri, 20 Feb 2004 01:36:46 -0800
| Newsgroups | gmane.os.cygwin.perl |
|---|---|
| Message-ID | <[email protected]> |
Cool! I'll definitely include your patch in a maintenance release I'll try to
put together sometime over the next couple of weeks...
If you peek into the win32/ directory in the perl sources the core Win32
functions are interspersed along with everything else in win32.c, and loaded
with newXS at init time. Win32CORE.c could technically be another object under
the cygwin/ directory that gets compiled in, and the boot function called at
some appropriate point.
The reason I didn't want to do that is because I don't really like the idea of
standard perl functions not really being standard and only working on one
architecture, and being commonly used at that. So my plan was to make Win32CORE
be used by win32, Cygwin and wince. It wouldn't change the characteristics of
the native win32 perl much, it would be just another .c file linked into
libperl. I had a patch I made last year against bleadperl (at that time) that
did exactly that, alas it got lost in the ether, I still have a copy if you
want to look at it.
This approach gives a common, upgradeable module that can be used by platforms
that have access to the Win32 API. That would be Win32, WinCE, CE.NET, Win64,
Cygwin...and unix. This would also make it possible to link Win32CORE, and
other win32 modules like Win32::GUI, against Winelib. The utility of this I
won't even attempt to argue, such things are not made to be necessarily useful.
BTW, do you think Cygwin should set $^E like win32 perl does? This wouldn't be
too hard to add, or even make configurable.
While on the subject, this is a good place to share some of what I'll be
working on wrt to this project, in no particular order or priority:
* Generalize perl module related stuff in the build script into patches for the
generic build script, so that other people can package perl modules easily for
Cygwin. Or at least put up a "generic perl module build script" somewhere.
* Try to bundle some recalcitrant, CPAN shell unfriendly win32 modules in the
package (as I added GUI). Surprisingly, many of them build just fine on Cygwin
now :)
* Dust of the Win32CORE patch I have and try to get it into Perl itself.
* Get added as a maintainer for some of the modules in libwin32 that I had to
patch, or that need to be worked on. For example the 64bit IO and tie interface
I was working on for Win32API::File, or find some other way to update them.
* Fix my CVS repository on sourceforge, I got bitten by the "entry getting
hopelessly corrupted due to committing file with differently capitalized name"
bug :( I'll probably end up just nuking it and starting over.
* Get the whole thing to build on *nix against winelib.
* There are some workarounds that need to be sent off as patches against
w32api.
* See if I can maybe implement open_osfhandle() in Cygwin in some shape or
form, and finish the APIFile tie interface.
* Sort out the Win32::AdminMisc mess. It's a popular module that's not in the
module index, has no MakeMaker support, is distributed under the GPL linked to
a proprietary .lib file (which violates the GPL, which makes it illegal to
distribute...) uses structured exception handling, etc.
* Other stuff I can't remember right now.
--
Rafael
>-----Original Message-----
>From: Yitzchak Scott-Thoennes
>Sent: Thursday, February 19, 2004 7:36 AM
>Subject: Re: New Package Available: perl-libwin32-0.191-1
>
>On Wed, Jan 21, 2004 at 02:08:30PM -0800, Rafael Kitover wrote:
>> The libwin32 Perl library that provides access to the Win32 API, and is
>> installed by default with ActivePerl, is now available as a Cygwin package.
>>
>> The CORE Win32 methods in ActivePerl such as Win32::GetLastError() (see man
>> Win32 or perldoc Win32) are also available as an extension.
>
>I've been experimenting with having perl automatically load Win32CORE
>at startup, but as is it drags in a lot more than is needed. This
>patch pares it down to what is needed:
>
>--- Win32CORE.pm.orig 2004-02-17 18:29:37.782817600 -0800
>+++ Win32CORE.pm 2004-02-19 07:25:12.080792000 -0800
>@@ -2,12 +2,8 @@
>
> $VERSION = '0.01';
>
>-use strict;
>-use warnings;
>-use vars qw($VERSION @ISA);
>-use base qw(Exporter DynaLoader);
>-
>-bootstrap Win32CORE $VERSION;
>+use XSLoader ();
>+XSLoader::load('Win32CORE', $VERSION);
>
> 1;
> __END__
>
>(XSLoader is a stripped down Perl frontend to DynaLoader; see its pod
>for more info.)
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/ndFolB/TM