delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/21/17:13:59

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Rafael Kitover" <caelum AT debian DOT org>
To: cygwin AT cygwin DOT com
Subject: [ANNOUNCEMENT] New Package Available: perl-libwin32-0.191-1
Message-Id: <20040121221227.84009400144@redhat.com>
Date: Wed, 21 Jan 2004 17:12:27 -0500 (EST)
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

Description
=====================================

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
Cygwin.

Quickstart
=====================================

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.

So while:

/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(
Win32::GetLastError)'
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.

Have fun!
=====================================

-- 
Rafael



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019