develooper Front page | perl.perl5.porters | Postings from September 2016

Re: should Dump \@tied trigger tied methods?

Thread Previous
From:
Dave Mitchell
Date:
September 28, 2016 10:22
Subject:
Re: should Dump \@tied trigger tied methods?
Message ID:
20160928102243.GK3193@iabyn.com
On Fri, Oct 17, 2014 at 05:00:12PM +0100, Dave Mitchell wrote:
> On Fri, Oct 17, 2014 at 04:24:43PM +0200, demerphq wrote:
> > >>     my @a = (a b c);
> > >>     tie @a, "main";
> > >>     Dump \@a;
> > >>
> > >> Then dump should display the 'a', 'b' and 'c' SVs
> > >>
> > >> If people concur, I'll fix it.
> > >>
> > >
> > > FWIW, I concur. DDS actually uses Object::Deadly to test this kind of
> > > thing. I suspect we should do the same with Devel::Peek.
> > >
> > >
> > HRm, I had a vague recollection that Object::Deadly did ties, but
> > apparently not.  Anyway, the point is still valid. DDS actively tests that
> > it will never call a method during serialization.
> 
> Well in the case of Perl_sv_dump, I think it just needs to directly
> access the raw fields of the AV, rather than using the API, e.g.
> use AvFILLp() rather than av_tindex()

I did this a few weeks ago with v5.25.3-182-g476fafd.

-- 
"Emacs isn't a bad OS once you get used to it.
It just lacks a decent editor."

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About