in reply to Object::MultiType - Perl Objects as Hash, Array & Scalar in the same time!
It turns out that when you dumped Symbol::genref you picked up exactly the bug I was attempting to avoid. You must delete the hash entry from the symbol table you just referenced. Do that and your code would look identical to Symbol::genref.
bart noticed that genref() (or the equivalent code (yours)) is actually very slow. PodMaster egged me on and I ended up creating Lexical::Typeglob::lexglob which is really just like Symbol::genref except it really avoids mucking with the symbol table. Its also four times faster than Symbol::genref which is nice. For the moment it can be downloaded from my personal site at http://www.greentechnologist.org/downloads/perl/Lexical-Typeglob-0.01.tar.gz and I'm considering publishing it on CPAN. I can't do that just yet because its missing documentation and a better test suite.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Object::MultiType - Perl Objects as Hash, Array & Scalar in the same time!
by gmpassos (Priest) on May 12, 2003 at 09:59 UTC | |
by diotalevi (Canon) on May 12, 2003 at 13:33 UTC | |
by gmpassos (Priest) on May 12, 2003 at 18:44 UTC |