<?xml version="1.0" encoding="windows-1252"?>
<node id="230894" title="Re*Re^2: Best Practices for Exception Handling" created="2003-01-29 04:40:29" updated="2005-07-27 17:27:58">
<type id="11">
note</type>
<author id="190859">
bart</author>
<data>
<field name="doctext">
&lt;blockquote&gt;&lt;i&gt;
of course, you might want to handle a method that can return 0 by using &lt;code&gt;defined&lt;/code&gt;&lt;/i&gt;&lt;/blockquote&gt;
Or use the trick that some other modules use: return &lt;code&gt;"0E0"&lt;/code&gt; or &lt;code&gt;"0 but true"&lt;/code&gt; for zero, as a string. These are both true and 0, and do not produce warnings when converted into a number, the former because it's a normal floating point format, the latter because it's a hardcoded exception in perl.&lt;P&gt;Now I come to think of it: you can use any normal format for zero, as long as it's not &lt;code&gt;"0"&lt;/code&gt;, for example &lt;code&gt;"0.0"&lt;/code&gt;.
</field>
<field name="root_node">
230799</field>
<field name="parent_node">
230826</field>
</data>
</node>
