+sub _next_udb {
+ use IndexData::Utils::PersistentCounter;
+
+ my $file = $ENV{IRSPY_COUNTER_FILE}
+ or die "no IRSPY_COUNTER_FILE in environment";
+ my $counter = new IndexData::Utils::PersistentCounter($file)
+ or die "can't open counter file '$file': $!";
+ my $val = $counter->next()
+ or die "can't get counter value from '$file': $!";
+ return "irspy-$val";
+}
+
+