Data::PropertyList 1998.1217 review

Download
by rbytes.net on

Data::PropertyList is a Perl module that can convert arbitrary objects to/from strings. SYNOPSIS use Data::PropertyList qw(as

License: Perl Artistic License
File size: 8K
Developer: Evolution Online Systems, Inc.
0 stars award from rbytes.net

Data::PropertyList is a Perl module that can convert arbitrary objects to/from strings.

SYNOPSIS

use Data::PropertyList qw(astext fromtext);

$hash_ref = { 'items' => [ 7 .. 11 ], 'key' => 'value' };
$string = astext($hash_ref);
# ...
$hash_ref = fromtext($string);
print $hash_ref->{'items'}[0];

$array_ref = [ 1, { 'key' => 'value' }, 'Omega' ];
$string = astext($array_ref);
# ...
$array_ref = fromtext($string, '-array'=>1 );
print $array_ref->[1]{'key'};

Data::Propertylist provides functions that turn data structures with nested references into NeXT's Property List text format and back again.

You may find this useful for saving and loading application information in text files, or perhaps for generating error messages while debugging.

astext( $reference ) : $propertylist_string;

Writes out a nested Perl data structure in NeXT property list format.

fromtext( $propertylist_string ) : $hash_ref

fromtext( $propertylist_string, '-array'=>1 ) : $array_ref

Reconstructs a Perl data structure of nested references and scalars from a NeXT property list. Use the -array flag if the string encodes an array rather than a hash.

Requirements:
Perl

Data::PropertyList 1998.1217 search tags