package Package; use Class::Std; { my %trunk_of :ATTRS( :get init_arg => 'trunk' ); sub BUILD { my ($self, $ident, $arg_ref) = @_; return; } } package Package::Branch; use base qw(Package); use Class::Std; { my %branch_of :ATTRS( :get init_arg => 'branch' ); my %trees_of :ATTRS( :get ); sub BUILD { my ($self, $ident, $arg_ref) = @_; return; } sub START { my ($self, $ident, $arg_ref) = @_; $trees_of{$ident} = 'lots of ' . $self->get_branch . 'es and' . $self->get_trunk . 's'; } }