Skip Menu |

This queue is for tickets about the CAM-PDF CPAN distribution.

Report information
The Basics
Id: 22136
Status: resolved
Priority: 0/
Queue: CAM-PDF

People
Owner: Nobody in particular
Requestors: Ian.MacDonald [...] datacomit.com.au
Cc:
AdminCc:

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



CC: "Dan Tyrrell" <dan.tyrrell [...] datacomit.com.au>, "Gerrard Jansen" <gerrard.jansen [...] datacomit.com.au>
Subject: Install problem on Windows XP
Date: Tue, 17 Oct 2006 12:15:44 +1000
To: <bug-CAM-PDF [...] rt.cpan.org>
From: "Ian MacDonald" <Ian.MacDonald [...] datacomit.com.au>
Hi, We're currently trialling CAM::PDF v1.07 and we've found a failed test and a minor problem with the test script when installing to Windows XP. We're using Active State Perl 5.8.8. The test that fails is the toPDF comparison for the file sample1.pdf. toPDF() seems to sometimes changing a CRLF sequence to CRCRLF. This test passes ok on a Linux platform. The problem with the test script is the use of is() for the toPDF test; when it fails, both PDF streams are dumped to the screen with unfortunate results, eg hieroglyphics, beeping, etc. I've changed it to an ok() test as shown here : ok($doc->toPDF() eq $content, "toPDF for $file"); and we get this output: C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/basic...........ok t/pdf.............ok 9/141 t/pdf.............NOK 46# Failed test 'toPDF for t/sample1.pdf' # in t/pdf.t at line 105. t/pdf.............ok 113/141# Looks like you failed 1 test of 141. t/pdf.............dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 46 Failed 1/141 tests, 99.29% okay (less 14 skipped tests: 126 okay, 89.36%) t/pod-coverage....skipped all skipped: Optional Pod::Coverage 0.17 not found -- no big deal t/pod.............skipped all skipped: Optional Test::Pod 1.14 not found -- no big deal Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------ ------- t/pdf.t 1 256 141 1 0.71% 46 2 tests and 14 subtests skipped. Failed 1/4 test scripts, 75.00% okay. 1/172 subtests failed, 99.42% okay. NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0xff' Stop. Thanks for the module! Regards Ian Macdonald Show quoted text
_____________________________________________________________________ DataComIT email: mailto:ian.macdonald@datacomit.com.au 55 Wellington Street Tel: +613 9522 2029 St Kilda VIC 3182 Fax: +613 9522 2099 A.B.N. 67 006 527 840 www: http://www.datacomit.com.au/
_____________________________________________________________________ This email may contain privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this email, you are hereby notified that any use, dissemination, distribution or reproduction of this email is prohibited. If you have received this email in error, please notify the sender or DataComIT at <mailto:info@datacomit.com.au> immediately and then destroy any electronic or paper copies of this message.
Subject: RE: [rt.cpan.org #22136] AutoReply: Install problem on Windows XP
Date: Tue, 17 Oct 2006 12:34:33 +1000
To: <bug-CAM-PDF [...] rt.cpan.org>
From: "Ian MacDonald" <Ian.MacDonald [...] datacomit.com.au>
Hi, Some further info; the problem occurs because the filehandle used to retrieve $content at line88 is not being modified with binmode(), and so the input data is subject to automatic CR/LF conversion. Changing the code to that shown below passes all tests ok: { open my $fh, '<', $file or die; binmode $fh; my $content = do{local $/=undef;<$fh>}; close $fh; ok($doc->toPDF() eq $content, "toPDF for $file"); } Binmode is a no-op under any OS that doesn't need it. Regards Ian Macdonald ian.macdonald@datacomit.com.au
This is fixed in the soon-to-be-released CAM::PDF v1.08. If the problem persists, please re-open this bug. Thanks much for the report! -- Chris