in reply to Re^13: RFC: OO Perl using Moo/Moose book (GoF / Updated)
in thread RFC: OO Perl using Moo/Moose book
package My::Obj; use Moo; has deputy => (is => 'ro', delegates => 'frobnicate');
where calling $obj->frobnicate(42); would in fact call
?$obj->deputy->can('frobnicate')->($obj, 42);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^15: RFC: OO Perl using Moo/Moose book (updated)
by LanX (Saint) on May 01, 2019 at 22:56 UTC | |
|
Re^15: RFC: OO Perl using Moo/Moose book (prototypical inheritance)
by LanX (Saint) on May 01, 2019 at 23:32 UTC |