Config::Apple::Profile::Payload::Types::Serialize - Convert common payload types to plist form.
This module contains code that is used to convert common payload types into plist form.
my $plist_fragment = serialize($type, $value, [$subtype]);
Given $value, returns a Mac::PropertyList object containing the contents of $value. $type must be one of the types listed in Config::Apple::Profile::Payload::Types, and is used to identify which type of plist item to create (string, number, array, etc.).
$value
Mac::PropertyList
$type
If $type is $ProfileArray or $ProfileDict, then $subtype must be defined. serialize will recurse into the structure, serialize it, and then put everything into the appropriate plist array or dictionary, which will be returned. $subtype is used to tell serialize what type of data is being used within the array or dictionary.
$ProfileArray
$ProfileDict
$subtype
serialize
If $type is $ProfileClass, then $value->plist will be called, and the result will be returned.
$ProfileClass
$value->plist
An exception will be thrown if $type or $subtype are not recognized.
Refer to the Config::Apple::Profile for acknowledgements.
A. Karl Kornel, <karl at kornel.us>
<karl at kornel.us>
Copyright © 2014 A. Karl Kornel.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Config::Apple::Profile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::Apple::Profile
CPAN shell
perl -MCPAN -e shell install Config::Apple::Profile
For more information on module installation, please visit the detailed CPAN module installation guide.