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

Re: [perl #128588] Tied hash magic ignored in references the firsttime 'round

Thread Previous | Thread Next
From:
Zefram
Date:
July 10, 2016 00:50
Subject:
Re: [perl #128588] Tied hash magic ignored in references the firsttime 'round
Message ID:
20160710004958.GI1170@fysh.org
Father Chrysostomos via RT wrote:
>I have a good counterexample.  If you have dumping code that tries to
>dump data structures without any side effects (including tied vars),
>it will no longer be able to use ref $ref_to_var_we_are_dumping without
>potentially calling code.

That code is going to have difficulty anyway in dumping data without
invoking ties.  ref() is far from a unique point of difficulty; how
do you imagine it acquiring a string value to dump?  The only way to
walk the data structure without invoking magic is by custom XS code,
and obviously that's not going to be affected by ref().

-zefram

Thread Previous | Thread Next


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