add the start of the bin and various bits to the makefile.pl

This commit is contained in:
Zane C. B-H 2019-05-01 02:34:30 -05:00
parent 21373abcf0
commit a4b605da30
2 changed files with 69 additions and 22 deletions

View File

@ -4,25 +4,26 @@ use warnings;
use ExtUtils::MakeMaker; use ExtUtils::MakeMaker;
my %WriteMakefileArgs = ( my %WriteMakefileArgs = (
NAME => 'VM::CBSD::Poller', NAME => 'VM::CBSD::Poller',
AUTHOR => q{Zane C. Bowers-Hadley <vvelox@vvelox.net>}, AUTHOR => q{Zane C. Bowers-Hadley <vvelox@vvelox.net>},
VERSION_FROM => 'lib/VM/CBSD/Poller.pm', VERSION_FROM => 'lib/VM/CBSD/Poller.pm',
ABSTRACT_FROM => 'lib/VM/CBSD/Poller.pm', ABSTRACT_FROM => 'lib/VM/CBSD/Poller.pm',
LICENSE => 'artistic_2', LICENSE => 'artistic_2',
MIN_PERL_VERSION => '5.006', MIN_PERL_VERSION => '5.006',
CONFIGURE_REQUIRES => { INST_SCRIPT => 'bin',
'ExtUtils::MakeMaker' => '0', CONFIGURE_REQUIRES => {
}, 'ExtUtils::MakeMaker' => '0',
TEST_REQUIRES => { },
'Test::More' => '0', TEST_REQUIRES => {
}, 'Test::More' => '0',
PREREQ_PM => { },
#'ABC' => '1.6', PREREQ_PM => {
#'Foo::Bar::Module' => '5.0401', 'JSON'=>'2.97.001',
}, 'Error::Helper'=>'1.0.0',
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, },
clean => { FILES => 'VM-CBSD-Poller-*' }, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
); clean => { FILES => 'VM-CBSD-Poller-*' },
);
# Compatibility with old versions of ExtUtils::MakeMaker # Compatibility with old versions of ExtUtils::MakeMaker
unless (eval { ExtUtils::MakeMaker->VERSION('6.64'); 1 }) { unless (eval { ExtUtils::MakeMaker->VERSION('6.64'); 1 }) {
@ -36,10 +37,10 @@ unless (eval { ExtUtils::MakeMaker->VERSION('6.55_03'); 1 }) {
} }
delete $WriteMakefileArgs{CONFIGURE_REQUIRES} delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
unless eval { ExtUtils::MakeMaker->VERSION('6.52'); 1 }; unless eval { ExtUtils::MakeMaker->VERSION('6.52'); 1 };
delete $WriteMakefileArgs{MIN_PERL_VERSION} delete $WriteMakefileArgs{MIN_PERL_VERSION}
unless eval { ExtUtils::MakeMaker->VERSION('6.48'); 1 }; unless eval { ExtUtils::MakeMaker->VERSION('6.48'); 1 };
delete $WriteMakefileArgs{LICENSE} delete $WriteMakefileArgs{LICENSE}
unless eval { ExtUtils::MakeMaker->VERSION('6.31'); 1 }; unless eval { ExtUtils::MakeMaker->VERSION('6.31'); 1 };
WriteMakefile(%WriteMakefileArgs); WriteMakefile(%WriteMakefileArgs);

View File

@ -0,0 +1,46 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Getopt::Long;
use Device::RAID::Poller;
use JSON;
sub version{
print "check_raid v. 0.0.0\n";
}
sub help{
&version;
print '
-p Print the JSON in a pretty format.
';
}
# command line option holders
my $help=0;
my $version=0;
my $pretty=0;
# get the commandline options
Getopt::Long::Configure ('no_ignore_case');
Getopt::Long::Configure ('bundling');
GetOptions(
'version' => \$version,
'v' => \$version,
'help' => \$help,
'h' => \$help,
'p' => \$pretty,
);
# print version or help if requested
if ( $help ){
&help;
exit 42;
}
if ( $version ){
&version;
exit 42;
}