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

kyoki at bestpractical.com kyoki at bestpractical.com
Tue Jul 29 13:48:56 EDT 2008


Author: kyoki
Date: Tue Jul 29 13:48:56 2008
New Revision: 14609

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

Log:
 r30145 at nyx:  kyoki | 2008-07-29 13:48:55 -0400
 some documentation for Plist.pm


Modified: Data-Plist/lib/Data/Plist.pm
==============================================================================
--- Data-Plist/lib/Data/Plist.pm	(original)
+++ Data-Plist/lib/Data/Plist.pm	Tue Jul 29 13:48:56 2008
@@ -1,3 +1,24 @@
+=head1 NAME
+
+Data::Plist - object representing a property list
+
+=head1 SYNOPSIS
+
+ #load
+ my $plist = Data::Plist->new($data);
+
+=head1 DESCRIPTION
+
+
+
+=cut
+
+=head1 SERIALIZED DATA
+
+
+
+=cut
+
 package Data::Plist;
 
 use strict;
@@ -9,6 +30,12 @@
 use vars qw/$VERSION/;
 $VERSION = "0.1";
 
+=head2 new
+
+Creates a new plist.
+
+=cut
+
 sub new {
     my $class = shift;
     return bless { data => undef, @_ } => $class;
@@ -42,16 +69,36 @@
     return $data;
 }
 
+=head2 raw_data
+
+Returns the plist as a set of nested arrays of the format 
+[ datatype => $data ].
+
+=cut
+
 sub raw_data {
     my $self = shift;
     return $self->{data};
 }
 
+=head2 data
+
+Returns the plist as its corresponding perl data structure.
+
+=cut
+
 sub data {
     my $self = shift;
     return $self->collapse( $self->raw_data );
 }
 
+=head2 is_archive
+
+Checks if the plist is Foundation::LibraryToDo
+object. Returns 1 if true and undef if false.
+
+=cut
+
 sub is_archive {
     my $self = shift;
     my $data = $self->raw_data;
@@ -135,6 +182,12 @@
     return $self->unref( $self->raw_data->[1]{'$top'}[1]{root} );
 }
 
+=head2 object
+
+Returns an Objective C archive made with NSKeyedArchiver.
+
+=cut
+
 sub object {
     my $self   = shift;
     my $prefix = shift;



More information about the Bps-public-commit mailing list