use warnings FATAL => 'all';
use ExtUtils::Manifest 'maniadd';
+use Getopt::Long qw(:config gnu_getopt);
+
+GetOptions(
+ "d|distdir=s" => \my $distdir,
+ "m|manifest=s" => \my $manifest,
+) or die("Error in command line arguments\n");
+if (defined $distdir) {
+ chdir $distdir;
+}
+if (defined $manifest) {
+ $ExtUtils::Manifest::MANIFEST = $manifest;
+}
for my $file (@ARGV) {
eval { maniadd({ $file => "$file file (added by Distar)"}) }