Skip Menu |

This queue is for tickets about the Data-Plist CPAN distribution.

Report information
The Basics
Id: 73720
Status: new
Priority: 0/
Queue: Data-Plist

People
Owner: Nobody in particular
Requestors: eoin [...] apple.com
Cc:
AdminCc:

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



Subject: Data::Plist::BinaryWriter write_fh doesn't handle large object graphs
Date: Tue, 03 Jan 2012 15:34:25 -0800
To: bug-Data-Plist [...] rt.cpan.org
From: eoin <eoin [...] apple.com>
The BinaryWriter doesn't handle more than 65535 object, although the plist file format does. The simple change is below: sub write_fh_big { my $self = shift; $self = $self->new() unless ref $self; my ( $fh, $object ) = @_; $object = $self->serialize($object) if ( $self->{serialize} ); binmode $fh; $self->{fh} = $fh; $self->{index} = []; $self->{size} = $self->count($object); $self->{objcache} = {}; if ( $self->{size} >= 4**8 ) { # this is the patch $self->{refsize} = 4; # this is the patch } elsif ( $self->{size} >= 2**8 ) { $self->{refsize} = 2; } else { $self->{refsize} = 1; } Thanks! -Eoin
Subject: [rt.cpan.org #73720]
Date: Tue, 03 Jan 2012 15:41:48 -0800
To: bug-Data-Plist [...] rt.cpan.org
From: eoin <eoin [...] apple.com>
Actually, the function should be write_fh, not write_fh_big ... that was a copy/paste error from a test build