Get instance in the top level moduleUsage:
my $instance = get_instance($pattern, @options); $pattern: Match pattern, can have wildcard "*", if it is empty, it is treated as "*" @options: -module: module name to have its instance name found $instance: Return the first instance matchingExamples:
#1. The fist hierarchical instance matching 'ui_'. $instance = getinstance("ui");
#2. Find the instance name of module 'enet_control' $instance = get_instance("-module", "enet_control");