Skip Menu |

This queue is for tickets about the autovivification CPAN distribution.

Report information
The Basics
Id: 90429
Status: rejected
Priority: 0/
Queue: autovivification

People
Owner: Nobody in particular
Requestors: brianski [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: disabling autovivification on a per-object basis
Any chance it would it be possible to add support for disabling autovivification on a per-object basis? Thanks!
Le Ven 15 Nov 2013 23:12:49, BRIANSKI a écrit : Show quoted text
> Any chance it would it be possible to add support for disabling > autovivification on a per-object basis? > > Thanks!
Hello and sorry for the late answer. Everything's possible but unfortunately it does not mean that it is always technically sensible to do so. Perl is written in a way such that autovivification is a feature tied with the deferencing syntaxic construct, not with how the variables are implemented. Your proposal would require to enable this module globally (because you don't know where your object is going to be dereferenced), then identify the variables that are marked as "should not vivify" and handle them correctly. It goes against how the core works internally and would definitely result in a large global performance hit, so I'm afraid I don't want to see it implemented in this module. Best, Vincent