develooper Front page | perl.perl5.porters | Postings from March 2023

Re: Pre-RFC Deep constants

Thread Previous | Thread Next
From:
demerphq
Date:
March 12, 2023 15:25
Subject:
Re: Pre-RFC Deep constants
Message ID:
CANgJU+X5=EjeYsxrbB3cRojLia6yqpmT6JgF_xQ9SRRbaU1feg@mail.gmail.com
On Sat, 11 Mar 2023 at 16:50, demerphq <demerphq@gmail.com> wrote:

> Like I said, it turns out that reasonable people can disagree on what a
> constant hash should be. :-) I really wish we didnt have restricted hashes
> getting in the way, simple "readonly" hashes would be much more useful than
> restricted hashes are.
>
> MMMM, I wonder if there is a way we can extend restricted hashes so they
> behave as people would expect a readonly/constant hash to behave without
> throwing out restricted hashes entirely. Maybe something like
> lock_hash(\%hash, undef); ? Eg, the undef would signal "allow any key".
> Hrmmmm...... Watch this space, maybe I can come up with a hack for this.
>

Turns out the important part of this is easy to do. I have a POC working on
my local build, I will push a patch in the next day or two.

cheers,
Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

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