Skip Menu |
 

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

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

People
Owner: rjray [...] blackperl.com
Requestors: joerg [...] joergmeltzer.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.59
Fixed in: 0.60



Subject: RPC::XML colons in tempfile crash 50_client.t on cygwin
Date: Tue, 20 Nov 2007 00:08:10 +0100
To: bug-RPC-XML [...] rt.cpan.org
From: Jörg Meltzer <joerg [...] joergmeltzer.de>
Download (untitled) / with headers
text/plain 2.1k
I am using RPC::XML 0.59 I noticed that RPC::XML uses temporary files with colons, because it derives the filename from __PACKAGE__. This is causing hickups, t/50_client.t fails at test 18. A Dumper on $res just befor the error reveals: $VAR1 = 'RPC::XML::Client::send_request: Error opening /home/johndoe/.cpan/build/RPC-XML-0.59-wVaeLg/t/RPC::XML::Client36121195513139: No such file or directory'; not ok 18 I suggest a transformation of colons to dashes, which is fine with Cygwin ( see patch below ). $ uname -a CYGWIN_NT-5.1 avenger 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin $ perl -v This is perl, v5.8.8 built for cygwin-thread-multi-64int (with 8 registered patches, see perl -V for more detail) Copyright 1987-2006, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. $ diff -u blib/lib/RPC/XML/Client.pm lib/RPC/XML/Client.pm --- blib/lib/RPC/XML/Client.pm 2007-11-19 23:44:57.359375000 +0100 +++ lib/RPC/XML/Client.pm 2007-11-19 23:45:19.593750000 +0100 @@ -236,7 +236,10 @@ require Symbol; # Start by creating a temp-file $tmpfile = $self->message_temp_dir || File::Spec->tmpdir; - $tmpfile = File::Spec->catfile($tmpfile, __PACKAGE__ . $$ . time); + # colons not supported in cygwin + (my $_tmp = +__PACKAGE__) =~ s/::/-/g; + $_tmp .= $$ . time; + $tmpfile = File::Spec->catfile($tmpfile, $_tmp); $req_fh = Symbol::gensym(); return "$me: Error opening $tmpfile: $!" unless (open($req_fh, "+> $tmpfile")); Patched 50_client.t gives: # Current time GMT: Mon Nov 19 23:02:44 2007 # Using Test.pm version 1.25 ok 1 ok 2 ok 3 ok 4 ok 5 ok 6 ok 7 ok 8 ok 9 ok 10 ok 11 ok 12 ok 13 ok 14 ok 15 ok 16 ok 17 $VAR1 = bless( do{\(my $o = 1)}, 'RPC::XML::boolean' ); ok 18 ok 19 Cheers, Jörg
From: rjray [...] blackperl.com
Download (untitled) / with headers
text/plain 127b
Good catch. This will be fixed in the next release. (Given the number of patches I currently have, that should be fairly soon.)
Subject: Re: [rt.cpan.org #30849] RPC::XML colons in tempfile crash 50_client.t on cygwin
Date: Wed, 21 Nov 2007 20:51:01 +0100
To: bug-RPC-XML [...] rt.cpan.org
From: Jörg Meltzer <joerg [...] joergmeltzer.de>
Download (untitled) / with headers
text/plain 699b
Hi Randy, Btw I had some problems while fixing the bug. It might be a good idea to get rid of File::Spec in favor of Cwd (also a core module) when searching for the test directory, it makes debugging easier. You use: use File::Spec; (undef, $dir, undef) = File::Spec->splitpath($0); This fails when you execute a test from within the t directory. I'd recommend chdir to "t" directory and use: use Cwd; $dir=cwd(); My 2 cents. Regards, Jörg Randy J Ray via RT schrieb: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=30849 > > > Good catch. This will be fixed in the next release. (Given the number of > patches I currently have, that should be fairly soon.) > > >
Download (untitled) / with headers
text/plain 216b
Thanks for catching that, as well. I'm solving it by using the rel2abs method of File::Spec (which internally used Cwd::cwd() anyway!). Getting close to having a new release cut, probably before the end of this week.
Download (untitled) / with headers
text/plain 102b
Changes for this bug have been committed to the SVN repo, and will be in the forthcoming 0.60 release.


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.