From fb40d666a8878b8272656e9de7ef7374f2ec3627 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sun, 28 May 2017 00:14:17 +0300 Subject: [PATCH] Make perlcritic tests pass --- lib/App/MusicExpo.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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{ -- 2.30.2