]> diplodocus.org Git - flac-archive/commitdiff
pod2usage on error
authorEric Gillespie <epg@pretzelnet.org>
Sun, 20 Mar 2022 18:52:13 +0000 (13:52 -0500)
committerEric Gillespie <epg@pretzelnet.org>
Sun, 20 Mar 2022 18:52:13 +0000 (13:52 -0500)
fa-encode

index 1401775f28e118009347f9d492b7d1ace099b4aa..5413ce0477d56e2e7bc7b7993d66592818736671 100755 (executable)
--- a/fa-encode
+++ b/fa-encode
@@ -21,8 +21,9 @@ use v5.12;
 use warnings;
 
 use FindBin;
+use Pod::Usage;
 
-require "$FindBin::Bin/tags.p";
+require "$FindBin::Bin/tags.pl";
 epg::flac::archive::tags->import(
     qw[
         read_tags
@@ -32,7 +33,7 @@ epg::flac::archive::tags->import(
     ]);
 
 sub main {
-    my $input_directory = shift;
+    my $input_directory = shift || pod2usage();
     my $fn = "$input_directory/tags";
     open(my $fh, '<', $fn) || die("open($fn): $!");
     my ($album, $tracks) = read_tags($fh);