App-makefilepl2cpanfile
view release on metacpan or search on metacpan
lib/App/makefilepl2cpanfile.pm view on Meta::CPAN
# Return the develop-tools hash from the user's YAML config file,
# or %DEFAULT_DEVELOP when no config file exists.
# Entry: None â reads from the filesystem at a well-known path.
# Exit: HashRef { Module::Name => minimum_version_or_0 }.
# Effects: Reads from disk. Croaks on YAML parse failure. Carps when the
# config file lacks a 'develop' key.
sub _load_develop_config {
my $home = File::HomeDir->my_home;
# Guard against environments with no home directory (containers, chroots,
# or CI systems where getpwuid returns no directory). path(undef) would
# croak from Path::Tiny with a confusing message; return defaults instead.
return {%DEFAULT_DEVELOP} unless defined $home;
my $cfg_path = path($home)
->child('.config', 'makefilepl2cpanfile.yml');
if ($cfg_path->is_file) {
my $yaml = YAML::Tiny->read("$cfg_path")
or croak "Failed to parse $cfg_path: " . YAML::Tiny->errstr();
( run in 1.133 second using v1.01-cache-2.11-cpan-6fb7bf0f510 )