develooper Front page | perl.moose | Postings from February 2012

MooseX::Storage -- what should pack() look like for Class::DBI?

Thread Next
From:
Bill Moseley
Date:
February 12, 2012 14:00
Subject:
MooseX::Storage -- what should pack() look like for Class::DBI?
Message ID:
CAKhN_m5289mQ0x-ebMZfjtADMNO+a3NSO0D_0Cg7ikNJJ8nV4w@mail.gmail.com
I'm using MooseX::Storage formatted with JSON to move some objects between
machines.  If I try and serialize a Class::DBI row object (or whatever it's
called in Class::DBI) MooseX::Storage complains that the class has no
pack() method.

What should that pack method look like?


BTW -- in MooseX::Storage::Basic the docs use "insert" but the key is
"inject".

*unpack ($data [, insert =* { key => val, ... } ] )>

Providing the insert argument let's you supply additional arguments to the
class' new function, or override ones from the serialized data.

Thanks,

-- 
Bill Moseley
moseley@hank.org


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About