Data::Plist - object representing a property list
# Create a new plist containing $data my $plist = Data::Plist->new($data); # Get nested arrays containing the perl data structure's # information my $ret = $plist->raw_data; # Get perl data structure $ret = $plist->data; # Get an Objective C object $ret = $plist->object;
Plists are intermediate structures from which nested array structures of the format specified in "SERIALIZED DATA", perl data structures and Objective C data structures can be obtained.
Perl data structures that have been serialized become nested array structures containing their data and their data type. Example:
[ array => [ string => "kitten" ], [ integer => 42], [ real => 3.14159 ] ]
Array references are passed around when dealing with serialized data.
Apple uses binary property lists as a serialization format from Objective C, in a format NSKeyedArchiver. Data::Plist has the capability to recognize property lists which were generated using NSKeyedArchiver, and to construct perl objects based on the information in the property list. Objects thus created are blessed under the Data::Plist::Foundation namespace. Thus, the root ancestor of all Objective C objects thus imported is Data::Plist::Foundation::NSObject.
NSKeyedArchiver
Data::Plist::Foundation
Creates a new Data::Plist object. Generally, you will not need to call this directly, as Plists are generally created by Data::Plist::Reader classes, and are not needed in serialization when using Data::Plist::Writer classes.
Takes an array of serialized data $data. Recursively returns the actual data, without the datatype labels.
$data
Returns the plist as a set of nested arrays of the format specified in "SERIALIZED DATA".
Returns the plist as its corresponding perl data structure.
Checks if the plist is actually an archived Objective C generated by NSKeyedArchiver. Returns true if it is. See "KEYED ARCHIVES".
Recursively strips references from the plist.
Takes serialized data (see "SERIALIZED DATA") $data and checks if it's a keyed archive (see "SERIALIZED DATA"). If the data is a keyed archive, it blesses it into the appropriate perl class.
If the plist is an Objective C object archive created with NSKeyedArchiver (see "KEYED ARCHIVES"), returns the object blessed into the corresponding class under Data::Plist::Foundation::NSOjbect. Otherwise, returns undef.
Class::ISA, DateTime, Digest::MD5, Math::BigInt, MIME::Base64, Scalar::Util, Storable, UNIVERSAL::isa, XML::Writer
No XML reader is included at current.
Please report any bugs or feature requests to bug-Data-Plist@rt.cpan.org, or through the web interface at http://rt.cpan.org.
bug-Data-Plist@rt.cpan.org
Alex Vandiver and Jacky Chang.
Based on plutil.pl, written by Pete Wilson <wilsonpm@gamewood.net>
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
To install Data::Plist, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Plist
CPAN shell
perl -MCPAN -e shell install Data::Plist
For more information on module installation, please visit the detailed CPAN module installation guide.