#! /usr/bin/env perl use strict; use warnings; # find our location and use it for searching for libraries BEGIN { use FindBin; use File::Spec; } # contains the directory our script is in my $sourceDir = File::Spec->catdir($FindBin::Bin); # define the version number # see https://metacpan.org/pod/release/JPEACOCK/version-0.97/lib/version.pod use version; our $VERSION = version->declare("v1.5.0"); use Data::Dumper; # see https://perldoc.perl.org/Getopt/Long.html use Getopt::Long; # allow -vvn (ie, --verbose --verbose --dryrun) Getopt::Long::Configure ("bundling"); # following variables modified by cli parameters my $version = 0; my $help = 0; ################################################################################################# # Libraries ################################################################################################# # simple display if --help is passed sub help { print < \$help, 'version' => \$version, ) or die "Error parsing command line\n"; if ( $help ) { &help() ; exit; } if ( $version ) { use File::Basename; print basename($0) . " $VERSION\n"; exit; } 1;