Skip Menu |

This queue is for tickets about the Pod-HtmlTree CPAN distribution.

Report information
The Basics
Id: 2936
Status: resolved
Priority: 0/
Queue: Pod-HtmlTree

People
Owner: Nobody in particular
Requestors: corion [...] cpan.org
Cc:
AdminCc:

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



Subject: Pod::HtmlTree fails under Win32: There is no directory /tmp
The tests and the module itself fail under Win32, as the directory for tempfiles is hardcoded and "/tmp" does not generally exist under that name on Win32. The solution is to use File::Temp qw(tempfile) in the sub pod2htmltree(): use File::Temp qw(tempfile); ... sub pod2htmltree { my ($fh,$tmpfile) = tempfile; ... # print output directly to $fh }; A tested very crude but minimal patch is to change line 128ff as follows : #my $tmpfile = "/tmp/PodHtmlTree.$$"; use File::Temp qw(tempfile); my ($fh,$tmpfile) = tempfile; close $fh; Here is the output of the failing "nmake test" and the failing test itself : D:\.cpan\build\Pod-HtmlTree-0.93>nmake test Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. D:\Programme\indigoperl-5.6\bin\perl.exe -MExtUtils::Command -e cp eg/po d2htmltree blib\script\pod2htmltree pl2bat.bat blib\script\pod2htmltree D:\Programme\indigoperl-5.6\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t\1.t t\1....ok 4/6Cannot open /tmp/PodHtmlTree.1388 at lib/Pod/HtmlTree.pm line 156. t\1....dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 5-6 Failed 2/6 tests, 66.67% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t\1.t 2 512 6 2 33.33% 5-6 Failed 1/1 test scripts, 0.00% okay. 2/6 subtests failed, 66.67% okay. NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x9' Stop. D:\.cpan\build\Pod-HtmlTree-0.93>perl -Ilib -w t\1.t 1..6 ok 1 ok 2 ok 3 ok 4 Cannot open /tmp/PodHtmlTree.836 at lib/Pod/HtmlTree.pm line 156. This is perl, v5.6.1 built for MSWin32-x86-multi-thread
RT-Send-CC: pht [...] perlmeister.com
Fix applied as suggested and released as 0.96. Thanks! -- Mike