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

master
Zane C. B-H 4 years ago
parent 21373abcf0
commit a4b605da30

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

@ -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;
}
Loading…
Cancel
Save