--As of June 14, 2008 12:36:45 PM -0700, Bill Ward is alleged to have said:

Only thing is, my utility only parses them, it doesn't write them.
PLists are strongly typed and Perl isn't, so generating a PList out of
an arbitrary Perl data structure is a little problematic...  need to
use a regex to see if it should be Integer or Real, but then how would
you determine True or False?

Data::Parser::PList could be the tool that reads them, and a subclass
:: XML would do the dirty work.  Other subclasses such as ::Binary or
:: Text (for that NeXT format) could be added.

--As for the rest, it is mine.

Just to mention: On a modern OS X machine you may have all _three_ formats, in different places. OS X 10.1 supported the text and XML versions, with the text version depreciated. 10.2 added the binary, and 10.4 made the binary versions the default. Support (as far as I can tell...) has never been dropped for the original text version.

Supporting the text version would be fairly easy in Perl, actually. It only had two 'data' types: String and 'Data' (which was in hex), and either array or dict as structure types.

But thought I'd mention, because if you ask the system for a plist file, it may give you any of the above types...

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------

Reply via email to