Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^2: Converting Hashes to Objects (updated)

by haukex (Bishop)
on May 19, 2020 at 12:18 UTC ( #11116938=note: print w/replies, xml ) Need Help??

in reply to Re: Converting Hashes to Objects
in thread Converting Hashes to Objects

Thank you for the feedback, that's an excellent point! I'll clarify the documentation. And I agree it does make sense to remove the hash entries that were turned into methods like you suggested. I'll have to think a bit more about whether it makes sense to also keep the method name in the "allowed keys" of the hash.

Update 2020-05-23: I thought about this some more, and I've decided to delete the hash entry and remove the key from the "allowed keys", unless that key is also specified in @allowed_keys. This allows the user to keep the typo prevention by default, but also optionally keep the key in the hash, for example in case they want to write a custom getter/setter. I just released v0.08 with this change, thank you!

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11116938]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2022-05-17 10:57 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (65 votes). Check out past polls.