my $obj = Class->new; $obj->a_method($param1, $param2..., $paramN); #### package My::Daemon; use strict; use warnings; use Frontier::Daemon; sub new { my($class, @args) = @_; .... my $self = {}; # empty anonymous HASH ref bless $self, $class; # make it an object and return it } sub some_method { my $self = shift; my $id = Frontier::Daemon->new( methods => { sum => sub { # anonymous sub as callback my @args = @_; # @args received from F::D somewhere .... $self->sum(@args); # call sum as object method }, }, ... other params ); } sub sum { my($self, $arg1, $arg2) = @_; ... } 1;