=head1 SYNOPSIS
-B<fa-flacd> [B<-jv>]
+B<fa-flacd> [B<-j> I<jobs>] [B<-v>]
=cut
use warnings;
use File::Basename;
-use Getopt::Std; $Getopt::Std::STANDARD_HELP_VERSION = 1;
+use Getopt::Long qw(:config gnu_getopt no_ignore_case);
use POSIX ':sys_wait_h';
-
-our $VERSION = 1;
+use Pod::Usage;
my $verbose;
my @jobs;
}
MAIN: {
- my %opts;
-
- $opts{'j'} = 4;
- $opts{'v'} = 0;
- if (not getopts('j:v', \%opts)) {
- print(STDERR "usage: flacd [-jN -v]\n");
- exit(2);
- }
-
- $verbose = $opts{'v'};
-
- flacloop($opts{'j'});
+ my $jobs;
+ my $help;
+
+ $jobs = 4;
+ GetOptions(
+ 'jobs|j=i' => \$jobs,
+ 'verbose|v' => \$verbose,
+ 'help|h|?' => \$help,
+ ) or pod2usage();
+ $help and pod2usage(-exitstatus=>0, -verbose=>1);
+
+ flacloop($jobs);
}
\f
to the artist directory (named by album) and removes the temporary
directory.
+=head1 OPTIONS
+
+=over 4
+
+=item B<-j> [B<--jobs>] I<jobs>
+
+Run up to I<jobs> jobs instead of the default 4.
+
+=item B<-v> [B<--verbose>]
+
+Print diagnostic information.
+
+=back
+
=head1 AUTHORS
Written by Eric Gillespie <epg@pretzelnet.org>.