package MyObject; use Class::MakeMethods::Autoload { 'new' => 'Template::Hash::new', '.*' => 'Template::Hash::scalar -self_closure', }; package main; my $object = MyObject->new(); my $new_func = $object->attrib(); $new_func->('value');