hello
can we assign values to a variable in a TYPE_INIT function and use it
at a read function ? I need
it to load the variable into memory only once and compare its content to
other variable at read functions
sub f_init {
$filename = 'file' ;
open IN, '<', $filename;
my @elements = <IN>;
close IN;
my %element_as_key = map { $_ => 'down' } @elements ;
return 0;
}
f_read {
my $list_size = $#elements + 1 ;
for my $el ( keys %element_as_key ) {
do the magic ..
}
}
is the example above doable ?
thank you!
_______________________________________________
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd