use if $ENV{PAR_PROGNAME}, File::ShareDir::PAR => 'global'; use File::UserConfig; my $configdir = File::UserConfig->configdir; ...