I assumed as much. I thought that perhaps someone was thinking that at some point you could make a Jifty::Record abstract by croaking in table(). Commits may be coming shortly.<br><br><div><span class="gmail_quote">On 7/16/07, 
<b class="gmail_sendername">Jesse Vincent</b> &lt;<a href="mailto:jesse@bestpractical.com">jesse@bestpractical.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>On Jul 16, 2007, at 6:07 PM, Andrew Sterling Hanenkamp wrote:<br><br>&gt; Glurg. Okay, I went to clean up and test everything before<br>&gt; committing this patch and discovered a initialization problem. It&#39;s<br>&gt; trying to call $model-&gt;table for the plugin models, which calls
<br>&gt; $model-&gt;_guess_table_name, but this happens before plugin class<br>&gt; itself is configured, which means that the table name will never be<br>&gt; prefixed, which is undesirable.<br>&gt;<br>&gt; I have traced it back into the class loader, which runs this
<br>&gt; snippet while loading the models around line 168, which is run<br>&gt; while generating the model action classes (which happens<br>&gt; automatically upon creation of a Jifty::ClassLoader instance):<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; local $@;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eval { $modelclass-&gt;table } ;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(!$@) {<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return $self-&gt;return_class(<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;package $module;\n&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; . &quot;use base qw/$base\::Action::Record::$1/;\n&quot;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; . &quot;sub record_class { &#39;$modelclass&#39; };\n&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; . &quot;sub autogenerated { 1 };\n&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;<br>&gt; If I understand what&#39;s going on here, it&#39;s checking to see if the
<br>&gt; model provides a valid and non-failing implementation of the table<br>&gt; () method to determine whether or not to actually build the action<br>&gt; classes. A similar check is in place for creating the model event
<br>&gt; class too.<br>&gt;<br>&gt; Is this necessary? If so, I can look for another way to short-<br>&gt; circuit the process until the plugins are initialized. If not, what<br>&gt; other check would suffice? I&#39;m not certain as for the purpose of
<br>&gt; this at all, so I&#39;m not sure what to do about it.<br><br>I bet that&#39;s just duck-typing. perhaps an -&gt;isa check?<br><br>-j<br><br>_______________________________________________<br>jifty-devel mailing list
<br><a href="mailto:jifty-devel@lists.jifty.org">jifty-devel@lists.jifty.org</a><br><a href="http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel">http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel</a><br>
<br><br></blockquote></div><br>