Hacker News new | past | comments | ask | show | jobs | submit login

Indeed. I wish with Perl I had a way to be explicit about when I could disable this behavior but its builtin to the language to such a degree to be unavoidable. (Using different Perl object frameworks and getter/setter methods is a possibility to protect against this class of error)

The implementation provided in the article is at least a known property of that particular object type and not a property of all objects.




You can switch off or amend autovivification behaviour using this pragma module - https://metacpan.org/pod/autovivification

    no autovivification;            # switches off autoviv except for setting

    no autovivification 'exists';   # just for exists checks


OMG. All I have to say is thank you.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: