]> iEval git - app-musicexpo.git/commitdiff
Switch to JSON::MaybeXS
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 6 Sep 2014 21:53:38 +0000 (00:53 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 6 Sep 2014 21:54:49 +0000 (00:54 +0300)
Makefile.PL
lib/App/MusicExpo.pm

index baea04b57704a20968c576c900baa0802c2c5d7e..f49ecc6922f8f530d0db7da0e260f26cc1429f06 100644 (file)
@@ -15,6 +15,7 @@ WriteMakefile(
                   HTML::Template::Compiled      0
                   Memoize                       0
                   MP3::Tag                      1.12
+                  JSON::MaybeXS                 0
                   DB_File                       0
                   Ogg::Vorbis::Header::PurePerl 0/,
        },
index 242e0df0cd19d66cba78cc883ad27b3c965edfb6..ef99911562494db12f098cdc34bd9016ce0d12bd 100644 (file)
@@ -15,7 +15,7 @@ use DB_File qw//;
 use File::Basename qw/fileparse/;
 use Fcntl qw/O_RDWR O_CREAT/;
 use Getopt::Long;
-use JSON;
+use JSON::MaybeXS;
 use Storable qw/thaw freeze/;
 
 ##################################################
@@ -129,7 +129,7 @@ sub run {
                push @files, \%entry
        }
 
-       my $json = JSON->new->utf8->canonical->encode({files => \@files, prefix => $prefix});
+       my $json = JSON::MaybeXS->new(canonical => 1)->encode({files => \@files, prefix => $prefix});
        $json =~ s/</&lt;/g;
        $json =~ s/>/&gt;/g;
        $ht->param(files=>[sort { $a->{title} cmp $b->{title} } @files], prefix => $prefix, json => $json);
This page took 0.019228 seconds and 4 git commands to generate.