@@ -53,7 +53,7 @@ BEGIN {
store_runvar get_runvar get_runvar_maybe
get_runvar_default need_runvars
unique_incrementing_runvar next_unique_name
- stashfilecontents runvar_is_synth
+ stashfilecontents runvar_is_synth runvar_glob
target_cmd_root_status target_cmd_output_root_status
target_cmd_root target_cmd target_cmd_build
@@ -3187,6 +3187,20 @@ sub runvar_access_check ($$) {
Carp::cluck $m;
}
+sub runvar_glob {
+ my $monitor = tied %r;
+ my $realr = $monitor || \%r;
+ my @out;
+ foreach my $pat (@_) {
+ if ($monitor) { runvar_access_check($pat, 'scan') }
+ foreach my $key (sort keys %$realr) {
+ next unless fnmatch $pat, $key;
+ push @out, $key;
+ }
+ }
+ @out;
+}
+
package RunvarMonitor;
use Carp;
use Osstest;