if ($self->hungry()) { $self->go_eat(); return; } if ($theater->is_open() && $self->wants_movie()) { $self->go_watch_movie(); return; } .... #### my @dispatch = ( [ sub { $_[0]->is_hungry }, sub { $_[0]->go_eat } ], ); foreach my $choice (@dispatch) { next unless $choice->[0]->( $self ); $choice->[1]->( $self ); last; }