[Bps-public-commit] r14288 - in Data-Plist: .
kyoki at bestpractical.com
kyoki at bestpractical.com
Fri Jul 18 16:34:02 EDT 2008
Author: kyoki
Date: Fri Jul 18 16:33:39 2008
New Revision: 14288
Modified:
Data-Plist/ (props changed)
Data-Plist/lib/Data/Plist/BinaryWriter.pm
Log:
r29795 at nyx: kyoki | 2008-07-18 16:33:35 -0400
added code to deal with data
Modified: Data-Plist/lib/Data/Plist/BinaryWriter.pm
==============================================================================
--- Data-Plist/lib/Data/Plist/BinaryWriter.pm (original)
+++ Data-Plist/lib/Data/Plist/BinaryWriter.pm Fri Jul 18 16:33:39 2008
@@ -200,6 +200,15 @@
return $self->binary_write($obj);
}
+sub write_data {
+ my $self = shift;
+ my ($data) = @_;
+ use bytes;
+ my $len = length $data;
+ my $obj = $self->make_type(4, $len) . $data;
+ return $self->binary_write($obj);
+}
+
sub count {
# this might be slightly over, since it doesn't take into account duplicates
my $self = shift;
More information about the Bps-public-commit
mailing list