The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
package Foo;
use Moose;

has something => ( is => 'rw' );
has callback => (is => 'ro');

sub doit {
    my ($self) = @_;

    if ($self->callback) {
        $self->callback->($self->something);
    }
}

1;