Ta, for the pointers. This does it, if anyone else has similar needs
sub includeGlobalConfig {
my $self = shift;
my ($appdir) = setting('appdir');
# For some reason Mason2 does not like the relative path
$appdir =~ s|/bin/..||;
my ($gconfig_file) = $appdir . "/" . config->{global_config};
die "Unable to find global config '$gconfig_file'" unless -f $gconfig_file;
my ($gconfig) = YAML::LoadFile($gconfig_file);
# Merge with default
map { config->{$_} = $gconfig->{$_} } keys %{$gconfig};
# If your using Mason2
config->{engines}{mason2}->{data_dir} = $appdir . "/data";
config->{engines}{mason2}->{comp_root} = $appdir . "/views";
config->{engines}{mason2}->{autoextend_request_path} = 0;
# Mason2 bug - when not running from server (i.e. test), it looses appdir for views
config->{views} = $appdir . "/views";
};
......