[Bps-public-commit] r14525 - in Data-Plist: .

kyoki at bestpractical.com kyoki at bestpractical.com
Fri Jul 25 15:45:54 EDT 2008


Author: kyoki
Date: Fri Jul 25 15:45:46 2008
New Revision: 14525

Modified:
   Data-Plist/   (props changed)
   Data-Plist/lib/Data/Plist/Writer.pm

Log:
 r30055 at nyx:  kyoki | 2008-07-25 15:45:43 -0400
 fixed some documentation


Modified: Data-Plist/lib/Data/Plist/Writer.pm
==============================================================================
--- Data-Plist/lib/Data/Plist/Writer.pm	(original)
+++ Data-Plist/lib/Data/Plist/Writer.pm	Fri Jul 25 15:45:46 2008
@@ -36,7 +36,7 @@
 
 =head2 new
 
-Abstract method that creates a new writer.
+Creates a new writer.
 
 =cut
 
@@ -46,11 +46,16 @@
     return bless \%args => $class;
 }
 
-=head2 write $filehandle, $object
+=head2 write $filehandle, $data
 
-Takes a perl data structure C<$object> and writes to the
-given filehandle C<$filehandle>. Can also write to a string
-if C<$filehandle> is not defined.
+=head2 write $filename, $data
+
+=head2 write $data
+
+Takes a perl data structure C<$data> and writes to the
+given filehandle C<$filehandle>, or filename
+C<$filename>. Can also write to a string if C<$filehandle>
+is not defined.
 
 =cut
 
@@ -77,10 +82,10 @@
 
 =head2 fold_uids $data
 
-Takes a slightly modified Cbjective C iCal data structure
-C<$data> unfolds it, assigning UIDs to its
-contents. Returns a nested collection of arrays formatted
-for writing.
+Takes a slightly modified Objective C archive made with
+NSKeyedArchiver C<$data> and unfolds it, assigning UIDs to
+its contents. Returns a nested collection of arrays
+formatted for writing.
 
 =cut
 
@@ -111,8 +116,10 @@
 =head2 serialize_value $data
 
 Takes a perl data structure C<$data> and turns it into a
-series of nested arrays of the format [datatype => data] in
-preparation for writing.
+series of nested arrays of the format [datatype => data]
+(see L<Data::Plist/Serialized data>) in preparation for
+writing. This is an internal data structure that should be
+immediately handed off to a writer.
 
 =cut
 sub serialize_value {
@@ -152,6 +159,11 @@
 Takes a data structure C<$data> and determines what sort of
 serialization it should go through.
 
+Objects wishing to provide their own serializations should
+have a 'serialize' method, which should return something in
+the internal structure mentioned above (see also
+L<Data::Plist/Serialized data>).
+
 =cut
 
 sub serialize {



More information about the Bps-public-commit mailing list