X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FApp%2FMusicExpo.pm;h=dd3e57565591620d7ab4ff9070e308618f3d1bf0;hb=6dcbbf44de50d95be5ba8f1e3416c1c1ade96f04;hp=bf7707078223a04698aba63923e7d5e1b0b9a64a;hpb=0397e9d0174ed48b439512065209fc4652f2a343;p=app-musicexpo.git diff --git a/lib/App/MusicExpo.pm b/lib/App/MusicExpo.pm index bf77070..dd3e575 100644 --- a/lib/App/MusicExpo.pm +++ b/lib/App/MusicExpo.pm @@ -163,10 +163,11 @@ sub run { push @files, \%entry } + @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=>[sort { $a->{title} cmp $b->{title} } @files], prefix => $prefix, json => $json); + $ht->param(files => \@files, prefix => $prefix, json => $json); print $ht->output; } @@ -175,6 +176,9 @@ $default_template = <<'HTML'; Music + + +