sub subref { my $self = shift; return { order => ['A', 'B'], dispatch => { A => sub { $self->suba(@_) }, B => sub { $self->subb }, } }; }