Skip Menu |
 

This queue is for tickets about the RPC-XML CPAN distribution.

Report information
The Basics
Id: 47806
Status: resolved
Priority: 0/
Queue: RPC-XML

People
Owner: rjray [...] blackperl.com
Requestors: kmx [...] volny.cz
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.69

Attachments


Subject: [PATCH] Another (hopefully last) bunch of Win32 compatibility issues
Date: Sun, 12 Jul 2009 12:03:07 +0200
To: bug-RPC-XML [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Hi, thank you very much for releasing v0.67 my previously reported bugs fixed. I am very sorry for making another "Win32 troubles" but during detailed testing on Win32 platform I have found another more or less serious Win32 issues. I have prepared also a patch against v0.67 that fixes all of them. 1) Writing binary data into a filehandle via print() does not work well on Win32 (its well-known binary vs. ascii issue). This happens (at least) in Client.pm (between lines 282-293) while using compression of request data. I have fixed this by addinng "binmode($req_fh)" after opening the handle $req_fh. I am not sure if this is the only place in RPC::XML where this problems can occur. More systematic solution would probably be using "syswrite" instead of "print" but my patch using "binmode" was simpler and works. 2) Client timeout too long when server not running On Win32/Strawberry perl 5.10.0 (not an issue on Win32/5.8.9) for some reason the client timeout when the server is not running is very very long (this happens during tests at the beginning of 50_client.t, first I thought that tests hang up). I have solved this by adding "$cli->timeout(5)" near the beginning of 50_client.t. 3) The trick with unlinking an open filehandle does not work on Win32 The result of this was that the temporary files created by RPC::XML stayed in temporary dir (or in the ./t/ dir after tests finished). I have decided to use slightly different approach based on File::Temp. To implement approximately the same behaviour (automatic deletion of temporary files) I patched RPC::XML to create temporary files via File::Temp with UNLINK=>1. It seems to work well (more testing would be fine). 4) Getting directory via "File::Spec->splitpath" was not Win32 aware In nearly all test you use something like this to get full path to directory: (undef, $dir, undef) = File::Spec->splitpath(File::Spec->rel2abs($0)); It works nice on UNIX systems; however on Win32 $dir contains path like this: - "\dir1\dir2\dir3" - the right value shoud be "d:\dir1\dir2\dir3" Path format "\aa\bb\cc" is also accreted by Win32 but I have patched the tests to return true full dir name on Win32 (it is compatible with UNIX) - patch looks like this: ($vol, $dir, undef) = File::Spec->splitpath(File::Spec->rel2abs($0)); $dir = File::Spec->catpath($vol, $dir, ''); 5) Dependency on Scalar::Util 1.20 makes trouble on Win32/Strawberry 5.10.0 (not an issue on Win32/5.8.9) The problem is that Win32/Strawberry 5.10.0 comes with pre installed Scalar::Util 1.19 and installation of the most recent version (1.21) fails during tests. I know that it is not a problem of RPC::XML but please consider if you can live with 1.19. 6) An issue in 40_server.t similar to RT 27778 revealed during test on Win32/cygwin Patched in the same way as MSWin32. I have fixed all the above described issues and you can find them in the attached .diff (it is a diff against official release 0.67). I have tested the patched version with the following perls: - Win32/Strawberry/5.8.9 - Win32/Strawberry/5.10.0 - Win32/Cygwin/5.10.0 - Linux/5.8.8 -- kmx

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 319b
Finally applied this patch, once I finished the work of converting the parsing engine to be based around a factory-class. Had to apply a couple of the patches by hand, but all tests pass. Keep an eye on this when I release 0.70 in a few days or so, to make sure the hand-patched files still work as expected on Windows.
Download (untitled) / with headers
text/plain 190b
Show quoted text
> Finally applied this patch ...
Thanks, I have briefly tested your latest version from github and seems to work OK on Win32 (tested both 5.10.0 and 5.8.9). Looking forward to 0.70 -- kmx
Download (untitled) / with headers
text/plain 205b
-- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Randy J. Ray Silicon Valley Scale Modelers: http://www.svsm.org rjray@blackperl.com randy.j.ray@gmail.com


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.