<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Cos it contains a code-ref (the DBH) which can't be freezed.<div><br class="webkit-block-placeholder"></div><div>But since then I did come up with *a* way of doing it:</div><div><br></div><div><a href="http://search.cpan.org/~jrobinson/DBIx-Class-0.08009/lib/DBIx/Class/Schema.pm#thaw">http://search.cpan.org/~jrobinson/DBIx-Class-0.08009/lib/DBIx/Class/Schema.pm#thaw</a> says</div><div><br class="webkit-block-placeholder"></div><div><blockquote type="cite" class=""><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial; font-size: 16px; ">Provided as the recommened way of thawing schema objects. You can call&nbsp;<code>Storable::thaw</code>&nbsp;directly if you wish, but the thawed objects will not have a reference to any schema, so are rather useless</span></blockquote></div><div><br></div><div><br class="webkit-block-placeholder"></div><div><font class="Apple-style-span" face="arial" size="4"><span class="Apple-style-span" style="font-size: 16px;"><span class="Apple-style-span" style="font-family: Helvetica; font-size: 13px; ">There are also freeze and dclone methods for&nbsp;symmetry. This was a new addition since&nbsp;0.08009 2008-01-20 13:30</span></span></font></div><div><br class="webkit-block-placeholder"></div><div>-ash</div><div><br class="webkit-block-placeholder"></div><div><br><div><div>On 15 Feb 2008, at 19:57, Jose Fonseca wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi, I just had the same problem that Bernhard Graf had in Sept. 2007 and caught up with this discussion: <br> <br> Ash Berlin Wrote:<br> "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."<br> <br> Quick question: why is the "schema" column of _source_handle undef'd when freeze()ing?&nbsp; <br> <br> <br> <pre>On Thu, Sep 20, 2007 at 10:18:10AM +0200, Bernhard Graf wrote:<br>&gt;<i> On Thursday 20 September 2007 09:42, Ash Berlin wrote:<br></i>&gt;<i> <br></i>&gt;<i> &gt; I wrote the ResultSourceHandle stuff, and I never could come up with<br>
</i>&gt;<i> &gt; a good way of specifying what schema to use in thawing the data. So<br></i>&gt;<i> &gt; currently you'd have to do<br></i>&gt;<i> &gt;<br></i>&gt;<i> &gt; $data-&gt;_source_handle-&gt;schema($schema);<br>
</i>&gt;<i> <br></i>&gt;<i> Not pretty, but this works at least.<br></i><br>$data-&gt;result_source($schema-&gt;source('User'));<br><br>just like it's always been since before ResultSourceHandle existed.<br><br>
Never call an _ prefix method from outside the object or a subclass thereof.<br><br>-- <br>      Matt S Trout       Need help with your Catalyst or DBIx::Class project?<br>   Technical Director                    <a href="http://www.shadowcat.co.uk/catalyst/">http://www.shadowcat.co.uk/catalyst/</a><br>
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?<br><a href="http://chainsawblues.vox.com/">http://chainsawblues.vox.com/</a>            <a href="http://www.shadowcat.co.uk/servers/">http://www.shadowcat.co.uk/servers/</a>
</pre> _______________________________________________<br>List: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class</a><br>IRC: irc.perl.org#dbix-class<br>SVN: <a href="http://dev.catalyst.perl.org/repos/bast/DBIx-Class/">http://dev.catalyst.perl.org/repos/bast/DBIx-Class/</a><br>Searchable Archive: <a href="http://www.grokbase.com/group/dbix-class@lists.rawmode.org">http://www.grokbase.com/group/dbix-class@lists.rawmode.org</a></blockquote></div><br></div></body></html>