use 5.10.1; use utf8; package C; # main class with user-facing API use Moose; use MooseX::Method::Signatures; method foo (Str $x) { say "Called original foo($x)."; } method build_c2 { return C::C2->new; } has c2 => ( is => 'rw', handles => [ 'bar' ], builder => 'build_c2', lazy => 1 ); method build_c3 { return C::C3->new; } has c3 => ( is => 'rw', handles => [ 'baz' ], builder => 'build_c3', lazy => 1 ); # ================== package C::C2; # a helper class use Moose; use MooseX::Method::Signatures; method bar (Str $x) { say "Called original bar($x)."; } # ================== package C::C3; # a helper class use Moose; use MooseX::Method::Signatures; method baz (Str $x) { say "Called original baz($x)."; } # ================== package main; my $c= C->new; $c->foo (1); $c->bar (2); $c->baz (3);