App-Music-ChordPro

 view release on metacpan or  search on metacpan

lib/ChordPro/Config.pm  view on Meta::CPAN

        while ( my ($k, $v) = each %{ChordPro::Chords::Parser->parsers} ) {
            warn( "  $k",
                  $v eq $cp ? " (active)": "",
                  "\n");
        }
    }

    return $cfg;
}

# Get the decoded contents of a single config file.
sub get_config ( $file ) {
    Carp::confess("FATAL: Undefined config") unless defined $file;
    my $verbose = $options->{verbose};
    warn("Reading: $file\n") if $verbose > 1;
    $file = expand_tilde($file);

    if ( $file =~ /\.json$/i ) {
        if ( my $lines = fs_load( $file, { split => 1, fail => "soft" } ) ) {
            my $new = json_load( join( "\n", @$lines, '' ), $file );
            precheck( $new, $file );

lib/ChordPro/Files.pm  view on Meta::CPAN

# This is necessary for long filenames and unicode filenames.

# NOTE: FILENAMES SHOULD AT ALL TIMES BE PERL STRINGS!

# Where do filenames come from?
#
# 1. Command line arguments. Decode ASAP.
# 2. File (and directory) dialogs: Always perl string.
# 3. Preferences, configs, recents: should all be perl strings.
# 4. From filelists. We expect these lists to have UTF8 filenames that
#    get decoded when the list is read.

use Encode qw( decode_utf8 encode_utf8 );
use Ref::Util qw(is_ref);

use Exporter 'import';
our @EXPORT;
our @EXPORT_OK;

################ Platforms ################



( run in 1.819 second using v1.01-cache-2.11-cpan-0a987023a57 )