in reply to Re^2: I don't think inheritance is essential
in thread Advanced Perl Programming, 2nd edition
Yes, multiple inheritance is quite lame for mixin style programming, but try to think a bit more abstract.
The important part is that we use it in combination with NEXT for AOP like programming, think AspectJ without static trigger points!
The important part is that we use it in combination with NEXT for AOP like programming, think AspectJ without static trigger points!
Hope this makes it a bit clearer.package Foo; use base qw/Bar::Unicode Bar/; __PACKAGE__->prepare_parameters; package Bar; sub prepare_parameters { my $class = shift; # initialize parameters... } package Bar::Unicode; use NEXT; sub prepare_parameters { my $class = shift; # let parent initialize parameters $class->NEXT::prepare_parameters; # utf8 encode parameters... }
In Section
Seekers of Perl Wisdom