Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tangram::type::dump(3pm) [debian man page]

Tangram::Type::Dump(3pm)				User Contributed Perl Documentation				  Tangram::Type::Dump(3pm)

NAME
Tangram::Type::Dump - Handy functions for Pixie-like dumping of data SYNOPSIS
use Tangram::Type::Dump qw(flatten unflatten UNflatten nuke); use YAML qw(freeze thaw); # for instance my $frozen = freeze flatten($storage, $structure); # optional - remove circular references from flattened # structure so that it is freed up properly. nuke $frozen; # save frozen somewhere... # restore, but don't load objects straight away my $reconstituted = unflatten($storage, thaw $frozen); # restore, loading objects immediately my $original = UNflatten($storage, $frozen); # Alternative, quickly marshall a structure for saving my $structure; flatten($storage, $structure); # ... do something with it ... # restore to former glory; note that Tangram's cache will # prevent unnecessary DB access. unflatten($storage, $structure); DESCRIPTION
This module contains functions for traversing data structures which are not Tangram-registered objects, and replacing all the Tangram objects found with `Mementos'. When a similar data structure is fed back into the reversal function, the mementos are filled with on-demand references to the real objects. All these functions operate in place for maximum efficiency. FUNCTIONS
flatten($storage, $structure) Traverses the structure $structure, and replaces all the known (ie, already inserted) Tangram objects with references to them unflatten($storage, $structure) Performs the logical opposite of flatten, but only insofar as a `normal' user is concerned. `Normal' users, of course, don't care that the data structure is being loaded from the database as they use it :). BUGS
Should this module just be an extension to Tangram::Storage ? AUTHOR
Sam Vilain, samv@cpan.org. All rights reserved. This code is free software; you can use and/or modify it under the same terms as Perl itself. perl v5.8.8 2006-03-29 Tangram::Type::Dump(3pm)

Check Out this Related Man Page

Tangram::Driver::Pg(3pm)				User Contributed Perl Documentation				  Tangram::Driver::Pg(3pm)

NAME
Tangram::Driver::Pg - Orthogonal Object Persistence in PostgreSQL databases SYNOPSIS
use Tangram; use Tangram::Driver::Pg; $schema = Tangram::Driver::Pg->schema( $hashref ); Tangram::Driver::Pg->deploy($schema, $dbh); $storage = Tangram::Driver::Pg->connect( $schema, $data_source, $username, $password ); $storage->disconnect(); Tangram::Driver::Pg->retreat($schema, $dbh); DESCRIPTION
This is the entry point in the Pg-specific object-relational persistence backend. This module performs the following: METHODS
This backend does not add any methods; for a description of available methods, see Tangram::Relational. ERRATA
Tangram::Type::Dump::Storable objects are first encoded with MIME::Base64, because Tangram does not currently have an easy mechanism for calling "DBI->bind_param()" at the appropriate time to flag the column as binary. Tangram::Type::Dump::Perl objects are stored as "BYTEA" columns, which as of DBD::Pg 1.31, also do not get correctly escaped by the DBD driver. This also affects the (as-yet not fully functional) Tangram::Type::Dump::YAML back-end, which might put "" characters into a YAML document. It is recommended to use the "storable" type with Tangram::Type::Dump::Any for this reason. perl v5.8.8 2006-03-29 Tangram::Driver::Pg(3pm)
Man Page