my ($ok,$err); my $cfg_str = join ";\n", "package " . __PACKAGE__, "#line $config_source#1", "$config_data", "1"; my @handlers = keys %handler; { no strict 'refs'; # We don't want to introduce another scope, as that will # negate the effect of the local: NEXT: my $n = shift @handlers; local *{$n} = $handler{ $n }; goto NEXT if @handlers; $ok = eval $cfg_str; $err = $@; } if ($ok) { return $result } else { warn $err; return };