sub _get_instance { ... init singleton if not created yet. return $app; } sub log { # well there should be some easy way to somehow create function that forwards to singleton my $app = &_get_instance; $app->log(@_); }