Config-YAML-Modern

 view release on metacpan or  search on metacpan

lib/Config/YAML/Modern.pm  view on Meta::CPAN

    }

    unless ( -e $filename ) {
        croak sprintf $err_text->[1], $filename;
    }

    # this block for filename to hash key resolving
    # et my.config.yaml -> { my => { config => { $data_here } } }
    my ( $filename_for_hash, undef, $suffix ) =
      fileparse( $filename, qr/\.[^.]*/ );
    my @file_part = split m/\./, $filename_for_hash;

    # I care about all of you, but it bad practice!!!
    if ( defined $self->{'i_dont_use_suffix'} ) {
        $suffix =~ s/^\.//;

        # fix empty key addition
        push @file_part, $suffix if ( $suffix ne '' );
    }

    # if we are need key conversation



( run in 1.221 second using v1.01-cache-2.11-cpan-71847e10f99 )