From: Marius Gavrilescu <marius@ieval.ro>
Date: Sat, 27 May 2017 21:14:17 +0000 (+0300)
Subject: Make perlcritic tests pass
X-Git-Tag: 1.003~1
X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=fb40d666a8878b8272656e9de7ef7374f2ec3627;p=app-musicexpo.git

Make perlcritic tests pass
---

diff --git a/lib/App/MusicExpo.pm b/lib/App/MusicExpo.pm
index 49276c1..9f7de60 100644
--- a/lib/App/MusicExpo.pm
+++ b/lib/App/MusicExpo.pm
@@ -8,6 +8,7 @@ our $VERSION = '1.002001';
 use HTML::Template::Compiled qw//;
 use Memoize qw/memoize/;
 
+use Carp qw/carp/;
 use DB_File qw//;
 use Encode qw/encode/;
 use File::Basename qw/fileparse/;
@@ -121,7 +122,7 @@ sub opusinfo {
 		tracknumber => $tags->query('TRACKNUMBER'),
 		tracktotal => $tags->query('TRACKTOTAL'),
 		genre => $tags->query('GENRE'),
-		file => scalar fileparse $file
+		file => scalar fileparse $file,
 	);
 
 	freeze \%data;
@@ -132,7 +133,7 @@ my @optional_modules = (
 	[ 'MP3::Info', \&mp3info, '.mp3' ],
 	[ 'Ogg::Vorbis::Header::PurePerl', \&vorbisinfo, '.ogg', '.oga' ],
 	[ 'MP4::Info', \&mp4info, '.mp4', '.aac', '.m4a' ],
-	[ 'Audio::Opusfile', \&opusinfo, '.opus' ]
+	[ 'Audio::Opusfile', \&opusinfo, '.opus' ],
 );
 
 my %info;
@@ -145,7 +146,7 @@ for (@optional_modules) {
 }
 
 unless (%info) {
-	warn 'No tags-reading module detected. Install one of the following modules: ' . join ', ', map { $_->[0] } @optional_modules;
+	carp 'No tags-reading module detected. Install one of the following modules: ' . join ', ', map { $_->[0] } @optional_modules;
 }
 
 sub normalizer{