Hello all
The following code does not work
package toto;
use Object::InsideOut;
my @attr1
:Field;
my %_init_args :InitArgs = (
'attr1' => {
'field' => \@attr1,
'regex' => qr/attr1/,
'mandatory' => 1,
'type' => \&toto::_verify_attr1
});
sub _verify_attr1 :Private
{
return 1;
}
package main;
toto->new('attr1' => 'val1');
1;
I obtain the following result:
("Can't call private method 'toto->_verify_attr1' ...")
InsideOut documentation on 'TYPE CHECKING' gives an working example (not using the InitArgs attribute) with a private method
What is wrong in my code ?
Thanks