support / src_en /api.get_instance.txt
gofeco's picture
Upload 100 files
fe683c0 verified
raw
history blame contribute delete
569 Bytes
<h3 id='___get_instance'>get_instance</h3>
<pre>Get instance in the top level module
<b>Usage:</b> 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 matching
<b>Examples:</b>
#1. The fist hierarchical instance matching 'ui_*'.
$instance = get_instance("ui_*");
#2. Find the instance name of module 'enet_control'
$instance = get_instance("-module", "enet_control");
</pre>