<div class="gmail_quote">On Tue, Jun 9, 2009 at 2:00 PM, Devin Austin <span dir="ltr">&lt;<a href="mailto:devin.austin@gmail.com">devin.austin@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Are you creating plugins for each of those user actions? C::P:: is the plugin naming convention.  I could have missed something though.</blockquote><div><br>Hi Devin,<br><br>No, I&#39;m not creating plugins. You didn&#39;t miss something; I did. I&#39;m just creating controllers. My bad. <br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Anyway, check out this Chained tutorial I&#39;ve written, it covers the type of chaining you want to do.  Not quite as in depth as your example, but there is a &quot;nested&quot; chain, so I&#39;m sure you could figure it out from there.  If not, you have the list :-)<br>

<br><a href="http://www.catalyzed.org/2009/05/chained-the-awesomesauce.html" target="_blank">http://www.catalyzed.org/2009/05/chained-the-awesomesauce.html</a><br></blockquote><div><br>You&#39;ve written a really good and useful article. I wish I&#39;d run into it a few months ago. I&#39;ve spent a lot of time reading up on Chained, and working out method flows, so I am at least over the initial shock of the steep (to some of us mortals) learning curve. I don&#39;t have a &quot;Eureka!&quot; yet, tho. Let me see if I can clarify the problem I&#39;m having. <br>
<br>In many of the examples I&#39;ve seen, where you have a url like /account/*org/*,<br>they show a parent controller, and a child controller. For example, on the catalyst wiki, <a href="http://dev.catalyst.perl.org/wiki/gettingstarted/howtos/chainedexamples">http://dev.catalyst.perl.org/wiki/gettingstarted/howtos/chainedexamples</a>:<br>
<br>==========================================<br>package MyApp::Controller::Account;<br><br># match /account<br>sub base :Chained(&quot;/&quot;) :PathPart(&quot;account&quot;) :CaptureArgs(0) {}<br><br># match /account/*<br>
sub id :Chained(&quot;base&quot;) :PathPart(&quot;&quot;) :CaptureArgs(1) {}<br><br>package MyApp::Controller::Account::Org;<br><br># match /account/org<br>sub base :Chained(&quot;/account/base&quot;) :PathPart(&quot;org&quot;) :CaptureArgs(0) {}<br>
<br># match /account/org/*<br>sub id :Chained(&quot;base&quot;) :PathPart(&quot;&quot;) :CaptureArgs(1) {}<br>==========================================<br><br>But I have a situation where I need to flow thru methods that aren&#39;t tightly bound to a parent/child relationship. Or I need to be able to create parent/child methods &#39;on the fly.&#39;<br>
<br>In the scenario above, /account is anchored to the root url, /. Makes sense, you have to start somewhere, right? As a user, I want to create actionitems, and since they belong to me, I&#39;m initially ok with a parent User controller class in which base is anchored to &#39;/&#39; and a child Actionitems controller class. (But that gets me into trouble later...)<br>
<br>MyApp::User;<br>MyApp::User::Actionitem;<br><br>I have my CRUD methods for actionitems in the child class. This is fine for &#39;items that are unassociated to meetings or projects. But when I tell the &#39;item it now is attached to Meeting 37, and the meeting leader does a search on Actionitems people have attached to the meeting, things get complicated. Let&#39;s say the team leader is user # 16. She logs into her /user/profile, clicks on &#39;meetings,&#39; selects meeting 37, and does a search for actionitems people have sent to that meeting. Now we need a method flow like this:<br>
<br>/user/16/meeting/37/actionitem/list<br><br>The list displays. Each &#39;item has links to edit, delete, reassign, yada yada.<br>But my CRUD methods for actionitems are all located in MyApp::User::Actionitem. I haven&#39;t figured out how to flow thru the User class to get $user_obj, then Meeting class to pick up $meeting_obj, and finally Actionitem class to get you know what. <br>
<br>And when we throw /projects/ into the mix, we get even more complicated. <br><br>Have I succeeded in making the issue clear? Or have I convinced you I&#39;m completely insane? (Or maybe both...)<br><br>/dennis<br><br>
<br></div></div>