Subject: | OBJECT check failed (a blessed scalar is an object) |
package MyObjectFromScalarReference;
sub new {
my $class = shift;
my scalar; # will be an object
return bless \$scalar, class;
);
sub my_method {
my ($self, ...) = validate_pos(@_, {type => OBJECT}, ...);
...
return $self;
}
---
my $object = MyObjectFromScalarReference->new();
$object->my_method(...);
---
Parameter #1 ("MyObjectFromScalarReference=REF(0xd3279f8)") to
MyObjectFromScalarReference::my_method was an 'unknown', which is not
one of the allowed types: object