advertisement

Article:
  Using Perl to Manage Plist Files
Subject:   Alternative solution
Date:   2005-08-02 07:17:18
From:   leeg
Response to: Alternative solution

For nested values, I just noted that the NeXT-style plist format is almost exactly identical to the definition of an anonymous hash, and tried to massage it until it was exactly identical ;-). Then you get infinitely nested hashes/arrays. I'm sure it's possible, but my regexp skills were not up to scratch. I agree that you can use the Foundation-based solution in the wider context of CamelBones, but then that isn't portable (e.g. if your plists are stored on a FreeBSD NFS server, you may want to run your perl on FreeBSD not Darwin/OS X). There may be some CFLite glue for Perl which could help there, but Mac::PropertyList would definitely work.