[Bps-public-commit] r14640 - in Data-Plist: . lib/Data/Plist

kyoki at bestpractical.com kyoki at bestpractical.com
Wed Jul 30 12:24:07 EDT 2008


Author: kyoki
Date: Wed Jul 30 12:24:06 2008
New Revision: 14640

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

Log:
 r30179 at nyx:  kyoki | 2008-07-30 12:24:00 -0400
 * pod for XMLWriter.pm
 * more pod for Plist.pm


Modified: Data-Plist/lib/Data/Plist.pm
==============================================================================
--- Data-Plist/lib/Data/Plist.pm	(original)
+++ Data-Plist/lib/Data/Plist.pm	Wed Jul 30 12:24:06 2008
@@ -14,8 +14,6 @@
  # Get perl data structure
  $ret = $plist->data;
 
- $ret = $plist->raw_object;
-
  # Get an Objective C object
  $ret = $plist->object;
 
@@ -23,6 +21,7 @@
 =head1 DESCRIPTION
 
 
+=cut
 
 =head1 SERIALIZED DATA
 

Modified: Data-Plist/lib/Data/Plist/XMLWriter.pm
==============================================================================
--- Data-Plist/lib/Data/Plist/XMLWriter.pm	(original)
+++ Data-Plist/lib/Data/Plist/XMLWriter.pm	Wed Jul 30 12:24:06 2008
@@ -1,3 +1,28 @@
+=head1 NAME
+
+Data::Plist::XMLWriter - writes XML property lists from
+perl data structures.
+
+=head1 SYNOPSIS
+
+ # Create new
+ my $write = Data::Plist::XMLWriter->new;
+
+ # Writing to a string
+ my $str = $write->write($data);
+
+ # Writing to a file C<$filename>
+ $write->write($filename, $data);
+
+=head1 DESCRIPTION
+
+C<Data::Plist::XMLWriter> takes perl data structures,
+serializes them (see L<Data::Plist/SERIALIZED DATA>) and
+recursively writes to a given filehandle in Apple's XML
+property list format.
+
+=cut
+
 package Data::Plist::XMLWriter;
 
 use strict;
@@ -7,6 +32,16 @@
 use XML::Writer;
 use MIME::Base64 qw//;
 
+=head2 write_fh $fh, $data
+
+Takes a perl data structure C<$data>, serializes it (see
+L<Data::Plist/SERIALIZED DATA>) and passes it to
+L</xml_write> to be written to the filehandle C<$fh>. Also
+writes the headers and footers for the XML document. Returns
+1 to indicate success.
+
+=cut
+
 sub write_fh {
     my $self = shift;
     $self = $self->new() unless ref $self;
@@ -29,6 +64,14 @@
     return 1;
 }
 
+=head2 xml_write
+
+Takes serialized perl structures (see
+L<Data::Plist/SERIALIZED DATA>) and recursively checks tags
+and writes the data to the filehandle.
+
+=cut
+
 sub xml_write {
     my $self = shift;
     my $data = shift;



More information about the Bps-public-commit mailing list