[Melbourne-pm] Bug in "B"
mathew.blair.robertson at gmail.com
Sat Jul 24 20:23:50 PDT 2010
> I have found a bug in B->walksymtable... Someone here is more likely to
>> get a patch submitted than I ever will... :)
> Submit a patch if you have found a bug. Perl is a meritocracy, not a cabal.
Indeed. I have had good and bad experiences submitting patches to various
free-software projects... so I'm a little weary of making an effort that get
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.
> I have provided an example implementation which provides support for
>> blessed arrays, but am unsure how to walk other blessed types...
> Your code looks correct, but I think that's not the purpose of
> walksymtable(). I was under the impression that *all* symbol tables were
> hashes. I've never seen array based symbol tables let alone scalars.
That is an interesting comment. Indeed a function name with "walksymtable"
would imply some sort of key-value list, which is part of a symbol-table of
However, the perldoc for the function provides an example of its use and
its implementation implies that to not be the case. ie: walksymtable takes a
reference to something that has a symbol-table, such as a package or as
implied by 'symref' (a reference to a symbol...) some random definition of
whatever a symbol is... say a blessed object. But then it may just be my
interpretation of the wording.
So as you say, it may not be a bug in the sense that, as it does what it
I think if you want more info, discuss it on perl5-porters since they are
> the maintainers of the core modules.
Which I'm unlikely to find time for that...
For those interested, I came across this quirk as I was using a module I
developed a few years ago... I call it "B::Symbols"... Due to the various
implementations of inheritance, autoload, etc. it can be frustrating trying
to find out what functions can be applied to a given object; I developed
something that would return a list of all possible symbols on the object;
once you have at least the function name, you can then look up the docs for
Using it just recently, I came across a case where it would die -> I
eventually figured out that it couldn't handle non-hash based objects.
Of course I dont really consider this module to be CPAN worthy just yet...
sometimes it reports methods that dont exist, or methods are missing from
the list. If anyone is interested, I can post it here. Also, its possible
that something better exists, but I just dont know about it.
thanks for the reply,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Melbourne-pm