my $signature = $custom_coderef ? $custom_coderef->() : default_sig(); #### my $coderef = sub{ require Foo::Bar; my $signature = "blah"; return $signature; }