Subject: | PDF::Extract does not work with warnings enabled |
Date: | Tue, 19 Aug 2008 11:47:42 +0100 |
To: | bug-PDF-Extract [...] rt.cpan.org |
From: | Paul Waring <paul [...] xk7.net> |
PROBLEM:
Perl throws uninitialised variables errors when using the module
PDF::Extract with warnings enabled.
EXAMPLE SCRIPT:
#!/usr/bin/perl -w
use strict;
use PDF::Extract;
my $pdf = new PDF::Extract();
$pdf->savePDFExtract(PDFPages => "3", PDFDoc => "./thesis.pdf", PDFCache
=> "./");
EXPECTED RESULTS:
PDF file generated, no errors.
ACTUAL OUTPUT:
PDF file is generated, but with the following errors:
Use of uninitialized value in concatenation (.) or string at
/usr/lib/perl5/site_perl/5.8.8/PDF/Extract.pm line 658.
Use of uninitialized value in concatenation (.) or string at
/usr/lib/perl5/site_perl/5.8.8/PDF/Extract.pm line 658.
SYSTEM DETAILS:
uname -a
Linux rpc354 2.6.23.15-80.fc7 #1 SMP Sun Feb 10 17:29:10 EST 2008 i686
i686 i386 GNU/Linux
perl -v
This is perl, v5.8.8 built for i386-linux-thread-multi
PDF::Extract version
3.03 (latest from 'install PDF::Extract' in CPAN)
FIX:
Removing -w from the shebang line means the script runs without errors,
but the module needs to be patched so that it can run with warnings
enabled, otherwise scripts using the module also cannot use warnings.
--
Paul Waring
http://www.pwaring.com