package My::Abstract::Interface;
use Moose::Role;
requires qw( foo bar baz qux );
####
package My::Abstract::Interface;
use Carp;
sub foo { croak }
sub bar { croak }
sub baz { croak }
sub qux { croak }
##
##
#!/usr/bin/env perl
package Foo;
use Moose;
has string => ( is => 'rw', isa => 'Str' );
sub to_string { shift->string }
package Bar;
use Moose;
has _foo => ( is => 'rw', isa => 'Foo', handles => ['string'] );
around BUILDARGS => sub {my($o,$c)=(shift,shift);$c->$o(_foo => Foo->new(@_))};
sub to_string { uc shift->string }
package main;
my $foo = Foo->new( string => 'hello world' );
print $foo->to_string, $/;
my $bar = Bar->new( %$foo );
print $bar->to_string, $/;