my $conf = AppConfig->new({ ..., ERROR => \&handle_errors, ...});