<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:1754929582;
        mso-list-type:hybrid;
        mso-list-template-ids:-1494459534 67698713 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>Hi,<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I recently upgraded the DBIx::Class::Schema::Loader module
(from ??? to 0.05003), and found that it broke a previously-working syntax, of
following a foreign key to another table.&nbsp; For instance, in the Catalyst
Perl sub, I do &#8220;$c-&gt;stash-&gt;{builds} =
[$c-&gt;model('DB::Build')-&gt;all];&#8221;<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Then, on the page (a TT page), I had a FOREACH loop
&#8220;[% FOREACH build IN builds -%]&#8221;, and inside it, printed out
various values for each of the builds (server, version, source path, etc); one
of these was a foreign key to an &#8220;environment&#8221; table, which has
columns for &#8220;name&#8221; and &#8220;buildstring&#8221;; that line used to
look like:<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>&nbsp;&nbsp;&nbsp; &lt;td&gt;[% build.environment_id.name %]
([% build.environment_id.buildstring %])&lt;/td&gt;<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>However, that syntax is no longer working; now I need to
send the environment in a separate $c-&gt;stash call (and in several other
places, in the Perl code, I have had to change it to do a lookup on the
intermediate table first, then get the value&#8212;the multiple
&#8220;-&gt;&#8221; no longer work).<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I realize this isn&#8217;t strictly a Catalyst issue, but I
do recall seeing a suggestion on the list to upgrade that module to fix
something else (I think it was autocrud issues I was experiencing)&#8212;and
now that it&#8217;s breaking this very useful syntax, I&#8217;m wondering:<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='mso-list:Ignore'>a.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>if there&#8217;s a way to bring it back easily (like
adding some qw to the &#8220;use&#8221; line?); <o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='mso-list:Ignore'>b.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>if I should revert to the working version (or some version
in between what I previously had (how do I determine that, after the upgrade
has already happened?), which fixes the autocrud issues but doesn&#8217;t break
the &#8220;multiple &#8216;-&gt;&#8217;&#8221; usefulness); and <o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='mso-list:Ignore'>c.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>if there&#8217;s perhaps some other solution?<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>For now, the solution I&#8217;ve used seems kludgey; I added
to the Perl sub this line: &#8220;$c-&gt;stash-&gt;{environments} =
$c-&gt;model('DB::Environment')-&gt;all;&#8221;.&nbsp; And, instead of the
one-liner above in the TT, I now do 3 lines:<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>[% envid = build.environment_id -%]<o:p></o:p></p>

<p class=MsoNormal>[% env = environments.$envid -%]<o:p></o:p></p>

<p class=MsoNormal>&lt;td&gt;[% env.name %] ([% env.buildstring %])&lt;/td&gt;<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Thanks,<o:p></o:p></p>

<p class=MsoNormal><span style='font-size:8.0pt;font-family:"Arial","sans-serif"'>--<br>
<b>Ken Beal</b><br>
Senior Software Engineer, Build/Release<br>
<br>
Cross Country Automotive Services<br>
One Cabot Road<br>
Medford, MA 02155<br>
p: (781) 306-3605<br>
m: (978) 423-8977<br>
e: <a href="mailto:kbeal@crosscountry-auto.com"
title="mailto:kbeal@crosscountry-auto.com"><span style='color:blue'>kbeal@crosscountry-auto.com</span></a></span><o:p></o:p></p>

</div>

</body>

</html>

<table><tr><td bgcolor=#ffffff><font color=#000000><pre>Confidentiality Note: This e-mail message and any attachments may contain 
confidential or privileged information. If you are not the intended recipient, 
please notify me immediately by replying to this message and destroy all 
copies of this message and any attachments. Thank you.</pre></font></td></tr></table>