<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/1.1.6">
</HEAD>
<BODY>
yeah brian, sometimes autovivification is a mixed blessing. this behavior is discussed in the documentation for exists().<BR>
<BR>
On Thu, 2003-01-09 at 12:45, Brian Michalk wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE><FONT COLOR="#737373" SIZE="3"><I>I have had a nagging bug that I finally figured out.
I found that in some cases checking to see if a hash element is defined will
add to the hash.
The following line:
    103     if (defined $self-&gt;{keys}{cfg}{$varname}{ref_sub}) {
will add the hash element, $self-&gt;{keys}{cfg}{$varname}.  I had to change my
code to the following in order to get it to work correctly.

    102   if (defined $self-&gt;{keys}{cfg}{$varname}) {
    103     if (defined $self-&gt;{keys}{cfg}{$varname}{ref_sub}) {
    104       return $self-&gt;{keys}{cfg}{$varname}{ref_sub};
    105     }
    106   } else {
    107     return undef;
    108   }

I hope this helps anyone else who cares.

_______________________________________________
Austin mailing list
Austin@mail.pm.org</FONT>
<A HREF="http://mail.pm.org/mailman/listinfo/austin"><FONT SIZE="3">http://mail.pm.org/mailman/listinfo/austin</I></FONT></A></PRE>
</BLOCKQUOTE>
<PRE><TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>-- 
======================================================================
Ezra Pagel                                           Software Engineer
Perl/Java/Oracle                                         ezra@jdba.org
Austin Logistics, Inc.                      epagel@austinlogistics.com
Austin, Texas                                           (512)-651-5644</PRE>
</TD>
</TR>
</TABLE>
</PRE>
</BODY>
</HTML>