develooper Front page | perl.libwin32 | Postings from May 2012

RE: 3 Win32::API bugs

Thread Previous | Thread Next
From:
bulk 88
Date:
May 11, 2012 04:40
Subject:
RE: 3 Win32::API bugs
Message ID:
COL115-W6434D26D1FBD0F386FEB1ADF160@phx.gbl


----------------------------------------
> From: bulk88@hotmail.com
> To: cosimo@streppone.it; libwin32@perl.org; dada@perl.it
> Subject: RE: 3 Win32::API bugs
> Date: Thu, 10 May 2012 12:00:57 -0400
> I still don't know what letter to use for shorts. $ has no lower case version for signed short. H is too closed to hex numbers and pack's existing H unpack feature letter (H="Half"), someone might want to put in a 'H' type code one day to get strings back in ASCII HEX from Win32::API rather than binary gibberish.  T (T="shorT", also "strucT", but sturct is S already), isn't used by pack, W (W="Word") is used for BER numbers by pack, and I've never seen those anywhere, so W or T I think are safe choices.
>
Another serious backwards compatibility problem. Win32::API's documentation official states only the flags that exist (I N F D C P S K) are all upper case, but in pack() upper case is unsigned number. In Win32::API::Type types are correctly mirrored as unsigned to upper case, signed to lower case. How is this supposed to be solved? API versioning "use Win32::API 0.69;" and an internal to Win32::API flag to invert the meaning of upper and lower case and turn on unsigned support? Time to fork Win32::API under a new name? or make a new PM called Win32::API::V2 or something that turned on unsigned support and inverts meaning of upper and lower case?
 		 	   		  
Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About