Subject: | Avoid use of deprecated exists($a[$i]) |
Object::Accessor uses L<perlfunc/exists> on array elements, and that has
been deprecated since at least 5.12.0.
I think avoiding it is very simple:
--- a/lib/Object/Accessor.pm
+++ b/lib/Object/Accessor.pm
@@ -513,7 +513,7 @@ sub ___autoload {
}
### need to check the value?
- if( exists $self->{$method}->[ALLOW] ) {
+ if( defined $self->{$method}->[ALLOW] ) {
### double assignment due to 'used only once' warnings
local $Params::Check::VERBOSE = 0;
@@ -576,7 +576,7 @@ sub ___set {
my $method = shift or return;
### you didn't give us a value to set!
- exists $_[0] or return;
+ @_ or return;
my $val = shift;
### if there's more arguments than $self, then