[Dbix-class] serializing DBIx::Class::ResultSourceHandle

Matt S Trout dbix-class at trout.me.uk
Thu Sep 20 16:58:15 GMT 2007


On Thu, Sep 20, 2007 at 10:18:10AM +0200, Bernhard Graf wrote:
> On Thursday 20 September 2007 09:42, Ash Berlin wrote:
> 
> > I wrote the ResultSourceHandle stuff, and I never could come up with
> > a good way of specifying what schema to use in thawing the data. So
> > currently you'd have to do
> >
> > $data->_source_handle->schema($schema);
> 
> Not pretty, but this works at least.

$data->result_source($schema->source('User'));

just like it's always been since before ResultSourceHandle existed.

Never call an _ prefix method from outside the object or a subclass thereof.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/



More information about the DBIx-Class mailing list