From: Marius Gavrilescu Date: Thu, 2 Apr 2015 11:27:06 +0000 (+0300) Subject: Replace json with classes X-Git-Tag: 0.005~5 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=9597938811ed0c5bcc0b9ec52b166cbce18b8794;p=app-musicexpo.git Replace json with classes --- diff --git a/Makefile.PL b/Makefile.PL index 41dbd89..89e82bd 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -16,7 +16,6 @@ WriteMakefile( Memoize 0 MP3::Tag 1.12 MP4::Info 0 - JSON::MaybeXS 0 DB_File 0 Ogg::Vorbis::Header::PurePerl 0/, }, diff --git a/lib/App/MusicExpo.pm b/lib/App/MusicExpo.pm index dd3e575..a9a9058 100644 --- a/lib/App/MusicExpo.pm +++ b/lib/App/MusicExpo.pm @@ -16,7 +16,6 @@ use DB_File qw//; use File::Basename qw/fileparse/; use Fcntl qw/O_RDWR O_CREAT/; use Getopt::Long; -use JSON::MaybeXS; use Storable qw/thaw freeze/; ################################################## @@ -164,10 +163,7 @@ sub run { } @files = sort { $a->{title} cmp $b->{title} } @files; - my $json = JSON::MaybeXS->new(canonical => 1)->encode({files => \@files, prefix => $prefix}); - $json =~ s//>/g; - $ht->param(files => \@files, prefix => $prefix, json => $json); + $ht->param(files => \@files, prefix => $prefix); print $ht->output; } @@ -184,10 +180,8 @@ $default_template = <<'HTML'; TitleArtistAlbumGenreTrackYearType -/ +/ - - HTML 1;