sub perl_config() { my $arg = shift; my $dbh = newdb(); my $config = init AstConfig(); print "\n\n\nperl config called on $arg\n"; if($arg eq "queues.conf") { my $sth = $dbh->prepare("SELECT * FROM ast_config where filename='queues.conf' order by cat_metric,var_metric,id"); $sth->execute(); while (my $ref = $sth->fetchrow_hashref()) { $config->add_var($ref->{category},$ref->{var_name},$ref->{var_val}); } $sth->finish(); return $config->return_data(); } if($arg eq "queues2.conf") { $config->add_cat("somequeue"); $config->add_var("somequeue","Member","Agent/1000,1234,1"); $config->add_var("somequeue","Member","Agent/1001,1234,1"); $config->add_cat("anotherqueue"); $config->add_var("anotherqueue","Member","Agent/1000,1234,1"); $config->add_var("anotherqueue","Member","Agent/1001,1234,1"); return $config->return_data(); } }