<?xml version="1.0" encoding="windows-1252"?>
<node id="1014484" title="Re: Hungarian notation, kind of" created="2013-01-21 11:15:26" updated="2013-01-21 11:15:26">
<type id="11">
note</type>
<author id="757127">
tobyink</author>
<data>
<field name="doctext">
&lt;p&gt;The one place I find this sort of thing useful is where you're dealing with a bunch of different pieces of data, some of which are in a "processed" state, and other in an "unprocessed" state.&lt;/p&gt;

&lt;p&gt;For example, you have a &lt;c&gt;$title&lt;/c&gt;, &lt;c&gt;$author&lt;/c&gt; and &lt;c&gt;$body&lt;/c&gt; for an article; the &lt;c&gt;$body&lt;/c&gt; is stored in your database as a blob of HTML, so doesn't need entity encoding when you pump it into an HTML template, but the other two are stored as text in the database, so need entity encoding when inserted into the template.&lt;/p&gt;

&lt;p&gt;So I'd call them something like &lt;c&gt;$title_txt&lt;/c&gt;, &lt;c&gt;$author_txt&lt;/c&gt; and &lt;c&gt;$body_html&lt;/c&gt;.&lt;/p&gt;

&lt;p&gt;Other examples might be where some of your bits of data are UTF-8 encoded byte strings, and others are Unicode character strings; or some bits of data are tainted and others are not; etc.&lt;/p&gt;

&lt;div class="pmsig"&gt;&lt;div class="pmsig-757127"&gt;
&lt;small&gt;&lt;small&gt;&lt;tt&gt;package Cow { use Moo; has name =&gt; (is =&gt; 'lazy', default =&gt; sub { 'Mooington' }) } say Cow-&gt;new-&gt;name&lt;/tt&gt;&lt;/small&gt;&lt;/small&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1014477</field>
<field name="parent_node">
1014477</field>
</data>
</node>
