<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 16 Feb 2008, at 02:37, Jose Fonseca wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Sure. I asked because I'm working under Apache so freezing that DBH works just fine. Apache::DBI will give you a brand new DBH everytime your DBH is obsolete.</blockquote><div><br class="webkit-block-placeholder"></div><div>No it wont. It will try to and will get it wrong. DBIx::Class works around Apache::DBI being stupid and does a better job of it.</div><br><blockquote type="cite"><br><br>Thanks for the pointer, I had not seen your solution in <a href="http://Schema.pm">Schema.pm</a>, appreciate that. I either have to plug that into Apache::SessionX instead of Storable or continue to $data-&gt;result_source($schema-&gt;source('User')); like Matt Trout suggested. <br> <br>What I know is that I really need that object in Apache's session memory and not let it be recreated each time from disk(or dbh).</blockquote><div><br class="webkit-block-placeholder"></div><div>Why might I ask? Not doubting you - it just helps to have someone else check your logic.</div><br><blockquote type="cite"><br><br>Regards, <br>Ze<br><br><br><div class="gmail_quote">On Feb 15, 2008 6:20 PM, Ash Berlin &lt;<a href="mailto:ash_cpan@firemirror.com">ash_cpan@firemirror.com</a>&gt; wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="">Cos it contains a code-ref (the DBH) which can't be freezed.<div><br></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/%7Ejrobinson/DBIx-Class-0.08009/lib/DBIx/Class/Schema.pm#thaw" target="_blank">http://search.cpan.org/~jrobinson/DBIx-Class-0.08009/lib/DBIx/Class/Schema.pm#thaw</a> says</div> <div><br></div><div><blockquote type="cite"><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></div><div><font face="arial" size="4"><span style="font-size: 16px;"><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></div><div>-ash</div><div><br></div><div><br><div><div><div></div><div class="Wj3C7c"><div>On 15 Feb 2008, at 19:57, Jose Fonseca wrote:</div><br></div></div><blockquote type="cite"><div><div></div><div class="Wj3C7c"> 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/" target="_blank">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/" target="_blank">http://chainsawblues.vox.com/</a>            <a href="http://www.shadowcat.co.uk/servers/" target="_blank">http://www.shadowcat.co.uk/servers/</a></pre></div></div></blockquote></div></div></div></blockquote></div></blockquote></div></body></html>