Skip Menu |
 

This queue is for tickets about the Mac-PropertyList-XS CPAN distribution.

Report information
The Basics
Id: 99072
Status: resolved
Worked: 1.2 hours (70 min)
Priority: 0/
Queue: Mac-PropertyList-XS

People
Owner: kulp [...] cpan.org
Requestors: richie765 [...] gmail.com
Cc:
AdminCc:

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



MIME-Version: 1.0
X-Spam-Status: No, score=-2.449 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
X-Mailer: MailMate (1.8r4317)
X-Spam-Flag: NO
content-type: text/plain; charset="utf-8"; format="flowed"
Message-ID: <8429F4B3-0574-4FEA-A4D0-F21AAA8687C9 [...] gmail.com>
X-Received: by 10.224.29.195 with SMTP id r3mr23862465qac.47.1411434233653; Mon, 22 Sep 2014 18:03:53 -0700 (PDT)
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -2.449
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 510952404E1 for <cpan-bug+Mac-PropertyList-XS [...] hipster.bestpractical.com>; Mon, 22 Sep 2014 21:04:03 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wbZ+ZRpWf2aN for <cpan-bug+Mac-PropertyList-XS [...] hipster.bestpractical.com>; Mon, 22 Sep 2014 21:04:01 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 4FB9D2403A6 for <bug-Mac-PropertyList-XS [...] rt.cpan.org>; Mon, 22 Sep 2014 21:04:01 -0400 (EDT)
Received: (qmail 7255 invoked by alias); 23 Sep 2014 01:03:59 -0000
Received: from mail-qg0-f49.google.com (HELO mail-qg0-f49.google.com) (209.85.192.49) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Mon, 22 Sep 2014 18:03:57 -0700
Received: by mail-qg0-f49.google.com with SMTP id q107so3811536qgd.22 for <bug-Mac-PropertyList-XS [...] rt.cpan.org>; Mon, 22 Sep 2014 18:03:53 -0700 (PDT)
Received: from [192.168.0.27] ([179.210.40.64]) by mx.google.com with ESMTPSA id f17sm9165555qge.23.2014.09.22.18.03.51 for <bug-Mac-PropertyList-XS [...] rt.cpan.org> (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 22 Sep 2014 18:03:52 -0700 (PDT)
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Delivered-To: cpan-bug+Mac-PropertyList-XS [...] hipster.bestpractical.com
Subject: Error when loading single string binary plist
Return-Path: <richie765 [...] gmail.com>
X-RT-Mail-Extension: mac-propertylist-xs
X-Original-To: cpan-bug+Mac-PropertyList-XS [...] hipster.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=p4QskFo26BZZ47GeQO5pP9JHF584j9DvkAxg4oybqAw=; b=z679AgC5BBLTNaaZaBD9Yqnud4vplx2uJdPtLC0ux1+FE7oCVJmKKR/0baMBaMqw7R K01RMRpzSp3zF2YxiAfBrf3hko1/8bOL/vrg5ni3LTcQa6/feIjFl4h5u1IW6400DxqI dXUc0rlGGqI/m+H6sg/NXMzAtLY6zzP5lCmzw/JXkRC5HjxdG2pzBU6nF5OOMJep49CP hJ3Yyb9W5xg3+kTStIlgdGUAUwq9gJY38hZviam9D+R8dr+FsfAFkR5I4d91sFoGc7ie eaQxNAhSIxBPiAT0pxGreYxPCKZyN55iUlqhk64vwZGo2lIT9QnKYIsp1EjkSfXqgUb0 fANQ==
Date: Mon, 22 Sep 2014 22:03:47 -0300
X-Spam-Level:
To: bug-Mac-PropertyList-XS [...] rt.cpan.org
From: "Richard Faasen" <richie765 [...] gmail.com>
X-RT-Original-Encoding: ascii
X-RT-Interface: Email
Content-Length: 1599
Download (untitled) / with headers
text/plain 1.5k
When loading a single string binary plist file, I get the following error: not well-formed (invalid token) at line 1, column 16, byte 16 at /..../perl-5.18.2/lib/site_perl/5.18.2/darwin-thread-multi-2level/XML/Parser.pm line 187. The error also occurs with Mac::PropertyList::SAX. It works well with Mac::PropertyList and with XML property lists with all three modules. Steps to reproduce. cat << EOF > xml.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <string>Just a string</string> </plist> EOF plutil -convert binary1 xml.plist -o binary.plist # working perl -MMac::PropertyList=:all -MData::Dumper -e'print Dumper parse_plist_fh(*STDIN)->as_perl;' < xml.plist perl -MMac::PropertyList::XS=:all -MData::Dumper -e'print Dumper parse_plist_fh(*STDIN)->as_perl;' < xml.plist perl -MMac::PropertyList::SAX=:all -MData::Dumper -e'print Dumper parse_plist_fh(*STDIN)->as_perl;' < xml.plist perl -MMac::PropertyList=:all -MData::Dumper -e'print Dumper parse_plist_fh(*STDIN)->as_perl;' < binary.plist # not working perl -MMac::PropertyList::XS=:all -MData::Dumper -e'print Dumper parse_plist_fh(*STDIN)->as_perl;' < binary.plist perl -MMac::PropertyList::SAX=:all -MData::Dumper -e'print Dumper parse_plist_fh(*STDIN)->as_perl;' < binary.plist # Result not well-formed (invalid token) at line 1, column 16, byte 16 at /..../perl-5.18.2/lib/site_perl/5.18.2/darwin-thread-multi-2level/XML/Parser.pm line 187. # Expected result $VAR1 = 'Just a string';
MIME-Version: 1.0
In-Reply-To: <8429F4B3-0574-4FEA-A4D0-F21AAA8687C9 [...] gmail.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <8429F4B3-0574-4FEA-A4D0-F21AAA8687C9 [...] gmail.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-21040-1411436313-644.99072-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 1151
Download (untitled) / with headers
text/plain 1.1k
Thank you for this bug report. In the case of Mac::PropertyList::SAX, the development of the module was done before Mac::PropertyList started supporting binary plists (Mac::PropertyList 1.31_01 - Sun May 3 06:40:14 2009). Mac::PropertyList::XS was developed after this, but was intended to replace Mac::PropertyList::SAX's functionality only. The reason Mac::PropertyList::{SAX,XS} exist is that they can hand off the parsing to an XML parser to speed up deserialisation over pure-Perl string handling. According to the plist(5) man page, "The binary property list format is opaque and does not use XML." Therefore Mac::PropertyList::{SAX,XS} are now caught in the unfortunate situation where they no longer live up to their name and claim (since they claim to be drop-in replacements for Mac::PropertyList), but will probably never themselves handle binary plists (at least not ::SAX). It should be relatively easy to make these modules hand off binary plists to Mac::PropertyList. Patches to this effect will be gratefully reviewed and likely accepted. I am leaving this bug open in case someone wishes to make a stab at a solution. -- --kulp
MIME-Version: 1.0
In-Reply-To: <8429F4B3-0574-4FEA-A4D0-F21AAA8687C9 [...] gmail.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <8429F4B3-0574-4FEA-A4D0-F21AAA8687C9 [...] gmail.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-32586-1498337196-1823.99072-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 206
Download (untitled) / with headers
text/plain 206b
Mac::PropertyList::SAX version 0.86, just uploaded to PAUSE, delegates binary plist loading to Mac::PropertyList, and thus should once again serve as a drop-in replacement for Mac::PropertyList. -- --kulp


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.