This is the mail archive of the
mailing list for the Cygwin project.
New Package Available: perl-libwin32-0.191-1
- From: "Rafael Kitover" <caelum at debian dot org>
- To: <cygwin-announce at cygwin dot com>
- Date: Wed, 21 Jan 2004 14:08:30 -0800
- Subject: New Package Available: perl-libwin32-0.191-1
- Reply-to: The Cygwin Mailing List <cygwin at cygwin dot com>
- Reply-to: <caelum at debian dot org>
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.
Also included is version 0.0.670 of the actively developed Win32::GUI library,
providing access the Win32 graphical APIs.
A lot of this functionality is already available through the /proc interface
and various utilities bundled with Cygwin, but this allows greater
compatibility with CPAN modules and various scripts written for ActivePerl on
Browse through /usr/share/doc/perl-libwin32-0.191/. Examples and tests for
various modules and extra documentation is located there. Manual pages are
installed as well, eg. "man Win32API::File".
Differences from ActivePerl
* The core Win32 methods are statically linked into ActivePerl, they are NOT
when using this library.
/cygdrive/c/Perl/bin/perl -le 'print Win32::FormatMessage(5)'
works, in Cygwin you would have to do:
perl -MWin32 -le 'print Win32::FormatMessage(5)'
Generally, when porting a windows Perl script, a "use Win32;" statement will be
required. To get just the CORE method, "use Win32CORE;".
* $^E is the equivalent of Win32::FormatMessage(Win32::GetLastError()) on
ActivePerl, while it is the SAME as $! on Cygwin Perl. Therefore:
> perl -MWin32 -le 'open F,"xyzzy"; print $^E'
No such file or directory
> /cygdrive/c/Perl/bin/perl -MWin32 -le 'open F,"xyzzy"; print $^E'
The system cannot find the file specified
To get the equivalent:
> perl -MWin32 -le 'open F,"xyzzy"; print Win32::FormatMessage(
The system cannot find the file specified.
This may be fixed in the future.
* Win32API::File::OsFHandleOpen is not really implemented, since there is no
open_osfhandle() in Cygwin. At present it just ties a simple and not fully
functional interface to other Win32API::File calls to a Perl file handle. It
needs a lot more work to be transparent.
* Overlapped IO may not really work, but it hasn't really been implemented
fully in the library in the first place.