3 ms·
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.
by tkahnoski 8y ago
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.
- draegtun 8y agoYou can switch off or amend autovivification behaviour using this pragma module - https://metacpan.org/pod/autovivification https://metacpan.org/pod/autovivification no autovivification; # switches off autoviv except for setting no autovivification 'exists'; # just for exists checks
- tkahnoski 8y agoOMG. All I have to say is thank you.