Skip Menu |
 

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

Report information
The Basics
Id: 103188
Status: open
Priority: 0/
Queue: PDF-Burst

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

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

Attachments


Subject: defined %foo and defined @foo an error
Download (untitled) / with headers
text/plain 517b
Starting from perl 5.22 defined is no longer permitted on aggragates, ie. hashes and arrays. This has been warning as deprecated since at least 5.12, since it's behaviour is non-obvious. For an array or hash it doesn't check whether it has any elements, but whether some internal data structures have been initialized, for example: # perl 5.14.2 $ perl -M-warnings -le 'for (1 .. 2) { my %x; print 0+defined %x; print scalar keys %x; $x{abc} = 1 }' 0 0 1 0 The attached patch fixes the problem. Tony
Subject: no-defined-aggregate.patch
diff -ru PDF-Burst-1.20-MRnPWh/lib/PDF/Burst.pm PDF-Burst-1.20-v1YQc8/lib/PDF/Burst.pm --- PDF-Burst-1.20-MRnPWh/lib/PDF/Burst.pm 2011-10-02 09:45:48.000000000 +1100 +++ PDF-Burst-1.20-v1YQc8/lib/PDF/Burst.pm 2015-03-30 14:50:39.000000000 +1100 @@ -308,7 +308,7 @@ } close FILE; - defined %dat or warn("had nothing in '$doc_dat'?") and return; + %dat or warn("had nothing in '$doc_dat'?") and return; return \%dat; }
Download (untitled) / with headers
text/plain 868b
On Mon Mar 30 00:05:12 2015, TONYC wrote: Show quoted text
> Starting from perl 5.22 defined is no longer permitted on aggragates, > ie. hashes and arrays. > > This has been warning as deprecated since at least 5.12, since it's > behaviour is non-obvious. > > For an array or hash it doesn't check whether it has any elements, but > whether some > internal data structures have been initialized, for example: > > # perl 5.14.2 > $ perl -M-warnings -le 'for (1 .. 2) { my %x; print 0+defined %x; > print scalar keys %x; $x{abc} = 1 }' > 0 > 0 > 1 > 0 > > The attached patch fixes the problem. > > Tony
I went to install PDF::OCR2 this evening. 'make test' failed there because PDF::Burst failed to install for the reasons Tony cites. Do you plan to continue maintenance of this library? If not, are you willing to give out comaintenance bits? Thank you very much. Jim Keenan


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.