Re: New Package Available: perl-libwin32-0.191-1

Yitzchak Scott-Thoennes <[email protected]> Thu, 19 Feb 2004 07:36:01 -0800
Newsgroups gmane.os.cygwin.perl
Organization bs"d
Message-ID <[email protected]>
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 ---------------------~-->
Upgrade to 128-bit SSL Security!
http://us.click.yahoo.com/qZ0LdD/yjVHAA/TtwFAA/ndFolB/TM