Hey,<br><br><div class="gmail_quote">On Sun, Jul 25, 2010 at 1:23 PM, Mathew Robertson <span dir="ltr">&lt;<a href="mailto:mathew.blair.robertson@gmail.com">mathew.blair.robertson@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><div class="gmail_quote"><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div>I have found a bug in B-&gt;walksymtable...  Someone here is more likely to get a patch submitted than I ever will... :)</div>
</blockquote></div><div><br>Submit a patch if you have found a bug. Perl is a meritocracy, not a cabal.<br></div></div></blockquote><div><br></div></div><div>Indeed.  I have had good and bad experiences submitting patches to various free-software projects... so I&#39;m a little weary of making an effort that get punished.</div>
</div></blockquote><div><br>Same here. However each time I&#39;ve had a patch rejected, upon further reflection it did seem I assumed the wrong thing. In one case, it was a documentation bug which caused me to assume the wrong thing. The documentation was patched instead of the buggy code :)<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote">
<div>Separate to that, the main issue is that I first need to subscribe to some list just to submit something, and have done so previously.... I just figured someone here might already be subscribed to an appropriate list.</div>
</div></blockquote><div><br>I think by doing so allows reasoning of the patch to ferment and hopefully lead to a discussion. Otherwise, little discussion and quick commits could lead to bad decisions such as backslashes being a nameseperator ;p<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote"><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<div>I have provided an example implementation which provides support for blessed arrays, but am unsure how to walk other blessed types...<br></div></blockquote></div><div><br>Your code looks correct, but I think that&#39;s not the purpose of walksymtable(). I was under the impression that *all* symbol tables were hashes. I&#39;ve never seen array based symbol tables let alone scalars.<br>

</div></div></blockquote><div><br></div></div><div>That is an interesting comment.  Indeed a function name with &quot;walksymtable&quot; would imply some sort of key-value list, which is part of a symbol-table of an object.</div>
</div></blockquote><div><br>I think that&#39;s where you understanding could be incorrect. I think when it talks about symbol tables, it doesn&#39;t talk about the generic idea of symbol tables. It&#39;s actually talking about Perl&#39;s definitive symbol table. In other words, the first param needs to be of the form &quot;\%PACKAGE::&quot;.<br>
<br>If you still want to use walksymtable() with objects such as array-based objects, inside-out objects etc, you could do something like the following:<br><br>  my $arrayob = ArrayOb-&gt;new();<br>  walksymtable( \%{ (ref $arrayob ) . &quot;::&quot; }, sub { foreach ( @_ ) { print &quot;\t&quot;, $_-&gt;NAME,&quot;\n&quot; } }, sub { 0 }, ref( $arrayob) );<br>
<br>Alfie<br><br></div></div>