Make sure that when you copy and paste mason examples, any lines that start with '%' have the '%' in the first column of the line.&nbsp; Otherwise, the code won't be parsed properly.<br><br>EdF<br><br><div><span class="gmail_quote">
On 8/4/06, <b class="gmail_sendername">Malte Ubl</b> &lt;<a href="mailto:malte.ubl@gmail.com">malte.ubl@gmail.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;">
Hey,<br><br>I just installed Jifty on MacOS X 10.4 and started doing the tutorial<br>application.<br><br>Entering posts via the administration interface works, however when I<br>copy the code from the tutorial to view the posts I get a mason error.
<br>I am new to mason (long time template toolkit fan), so it is hard to<br>say why this is failing:<br><br>Error:<br>Global symbol &quot;$post&quot; requires explicit package name at<br>/Users/malte/jifty/MyWeblog/share/web/templates/index.html line 10.
<br>Global symbol &quot;$post&quot; requires explicit package name at<br>/Users/malte/jifty/MyWeblog/share/web/templates/index.html line 11.<br><br><br>Code:<br>&lt;%init&gt;<br>&nbsp;&nbsp;my $posts = MyWeblog::Model::PostCollection-&gt;new();
<br>&nbsp;&nbsp;$posts-&gt;unlimit();<br>&nbsp;&nbsp;&lt;/%init&gt;<br><br>&nbsp;&nbsp;&lt;&amp;|/_elements/wrapper, title =&gt;<br>Jifty-&gt;config-&gt;framework('ApplicationName') &amp;&gt;<br>&nbsp;&nbsp;&lt;dl&gt;<br>&nbsp;&nbsp;% while (my $post = $posts-&gt;next) {
<br>&nbsp;&nbsp; &lt;dt&gt;&lt;%$post-&gt;title%&gt;&lt;/dt&gt;<br>&nbsp;&nbsp; &lt;dd&gt;&lt;%$post-&gt;body%&gt;&lt;/dd&gt;<br>&nbsp;&nbsp;% }<br>&nbsp;&nbsp;&lt;/dl&gt;<br>&nbsp;&nbsp;&lt;/&amp;&gt;<br><br>When I try out the AJAX-driven variant I get the same error within the
<br>page_of_posts fragment.<br><br>The whole thing seems to be a scoping problem. When I define $post<br>within the init-block at the top the error goes away but $post is<br>empty when the method title ist called, so I guess that the my $post
<br>definition is somehow not visible on the next line.<br><br>I'm probably missing something really obvious, but thanks for your<br>help and great work anyway!<br><br>malte<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></blockquote></div><br>