package Parent; use Callback; sub new { bless {}, shift } sub do_something { ... } sub init { my $self = shift; my $coderef = \&do_something; Callback::do_callback($coderef, $self); } 1;