develooper Front page | perl.perl5.porters | Postings from October 2014

Re: should Dump \@tied trigger tied methods?

Thread Previous | Thread Next
Dave Mitchell
October 17, 2014 16:00
Re: should Dump \@tied trigger tied methods?
Message ID:
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()

In economics, the exam questions are the same every year.
They just change the answers.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About