11 default => sub { BankAccount->new },
12 handles => [ 'deposit', 'withdraw' ],
17 predicate => 'has_title',
18 clearer => 'clear_title',
21 has first_name => ( is => 'rw' );
23 has last_name => ( is => 'rw' );
28 $self->account->owner($self);
34 if ( @_ == 1 && 'ARRAY' eq ref $_[0] ) {
36 first_name => $_[0]->[0],
37 last_name => $_[0]->[1],
41 return $class->SUPER::BUILDARGS(@_);
48 my $title = join q{ }, $self->first_name, $self->last_name;
49 $title .= q[ (] . $self->title . q[)]
55 sub as_string { $_[0]->full_name }
59 __PACKAGE__->meta->make_immutable;