Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm thinking about tossing a module up onto CPAN, but figured I'd open up for comment first. As the name implies, it reads Macintosh Property List files, much like Mac::PropertyList and Mac::PropertyList::SAX and Mac::Tie::PList. So why do we need another module? Two words - "write access". About a year and a half ago, I needed to transmit some information from an OS X app to a server, parse it, manipulate it, and send it back to the OS X app. I decided that the simplest thing would be to use the existing property list format - it held all the data I needed, I wouldn't need a new parser on the cocoa side, and parsing it on the perl side was easy. What I found lacking in the CPAN options was write access - I needed to manipulate the data, not just simply read it. So I wrote my own module to do it. I recently dusted off the code for a different project and realized that the available offerings are still claiming that write access is a future item. So, here it is. You can try the code at http://www.bassetsoftware.com/perl/Mac-Plist-Writable.tar.gz (please note, Basset is required (on CPAN)), and any feedback or suggestions would be appreciated before I unleash it (assuming I do at all). I did my best to translate it directly into perl structures. So your NSDictionaries become hashrefs, your NSArrays become arrayrefs, and your scalars are still..scalars. But, the scalars are also tied objects that let you set the type of the object as well (Note! this is not automatic!).
In reply to Proposed module: Mac::PropertyList::Writable by jimt
|
|