This should work if you want to register your parameters in base_class. BTW you don't need to override parameter_config at all in this case because SUPER->parameter_config returns hash reference stored in $parameter_config variable in base class. So next two lines do affect hash used by base_class. If it is not desired effect you should clone that hash:my $parameter_config = __PACKAGE__->SUPER::parameter_config; $parameter_config->{max_length}{max} = 255; $parameter_config->{max_length}{default} = 255; sub parameter_config { $parameter_config }
Update: Fixed usage of wrong syntax (SUPER->method instead of __PACKAGE__->SUPER::method)use Storable qw(dclone); my $parameter_config = dclone(__PACKAGE__->SUPER::parameter_config); $parameter_config->{max_length}{max} = 255; $parameter_config->{max_length}{default} = 255; sub parameter_config { $parameter_config }
--
Ilya Martynov
(http://martynov.org/)
In reply to Re: Re: Re: OO - problem with inheritance
by IlyaM
in thread OO - problem with inheritance
by uwevoelker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |