Kjetil,

Sorry about this, I should have caught it faster

Could you please implement Serguei's recommendation?

http://www.nntp.perl.org/group/perl.cpan.testers.discuss/2010/11/msg2262.html

It[File::Temp]'s not broken, you're using it wrong.

     # TEST
     my ($newfh, $newfilename) = tempfile();
     my $content;
     $ini->WriteConfig($newfilename);

$newfh is opened filehandle for $newfilename, and you're trying to open this 
file again in your code.
You should close $newfh first, if you're going to use $newfilename and not 
$newfh.

-----Original Message-----
From: Kjetil Kjernsmo [mailto:kje...@kjernsmo.net] 
Sent: Wednesday, January 25, 2012 10:47 AM
To: Susanto, Leo
Cc: cpan-testers-discuss@perl.org
Subject: Re: RDF::Trine::Store::File test

On Wednesday 25. January 2012 11.55.28 Susanto, Leo wrote:
> It seems that it is borked on Strawberry too:
> http://www.cpantesters.org/cpan/report/4d73c9bd-6c2f-1014-886d-b1ed885448ee
> 

Ah, yes!

> Somehow I believe something about File::Util is causing the problem. I'll
> include cpan-testers-discuss, maybe one of the wizard can help you.

Great, thanks!

> C:\CPANTesters\cpan\build\RDF-Trine-Store-File-0.1-_oDzuD>C:\CPANTesters\Per
> l5.1
 0.1\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(1,
> 'inc', 'blib\li b', 'blib\arch')" t/file-manip.t
> t/file-manip.t ..
> ok 1 - use RDF::Trine::Store::File;
> ok 2 - Store object OK
> ok 3 - Store has one statement according to size
> ok 4 - Store has one statement according to count
> ok 5 - Etag is 32 chars long, only hex
> # Sleep one second to ensure new etag
> PROCESS TERMINATED DUE TO ERRORS
> # Tests were run but no plan was declared and done_testing() was not seen.
> 
> File::Util can't open
>    ╗.\C\\temp\xLcqJO9pv4½
> because no such file or directory exists.

Aha, interesting! This is what I do at this point:
https://metacpan.org/source/KJETILK/RDF-Trine-Store-File-0.1/t/file-manip.t#L31
In the first part of the tests, I let RDF::Trine::File::Store do the work. 
At the end of it,  I create an etag, which is basically just right now a hash 
digest of the file mtime. I test this for sanity, and then I want to ensure it 
changes and since mtime has a one-second resolution (that's perhaps not 
portable), I sleep one second before proceeding.

Then, I let File::Util work on the file, and thus I load from the same 
filename. 
At this point, it seems from the above output that the File::Temp-created file 
doesn't exist anymore on Windows. 

Could this be the real problem, and if so, how should I solve it?

Kjetil


Reply via email to