3 #==============================================================================
10 # ©opyleft STDyearDTS– Øyvind A. Holm <sunny@sunbase.org>
11 # License: GNU General Public License version 2 or later, see end of file for
13 #==============================================================================
31 $progname =~ s/^.*\/(.*?)$/$1/;
32 our $VERSION = '0.0.0';
34 Getopt
::Long
::Configure
('bundling');
37 'help|h' => \
$Opt{'help'},
38 'quiet|q+' => \
$Opt{'quiet'},
39 'verbose|v+' => \
$Opt{'verbose'},
40 'version' => \
$Opt{'version'},
42 ) || die("$progname: Option error. Use -h for help.\n");
44 $Opt{'verbose'} -= $Opt{'quiet'};
45 $Opt{'help'} && usage
(0);
46 if ($Opt{'version'}) {
60 # Print program version
61 print("$progname $VERSION\n");
66 # Send the help message to stdout
69 if ($Opt{'verbose'}) {
75 Usage: $progname [options] [file [files [...]]]
82 Be more quiet. Can be repeated to increase silence.
84 Increase level of verbosity. Can be repeated.
86 Print version information.
93 # Print a status message to stderr based on verbosity level
94 my ($verbose_level, $Txt) = @_;
96 $verbose_level > $Opt{'verbose'} && return;
97 print(STDERR
"$progname: $Txt\n");
103 # This program is free software; you can redistribute it and/or modify it under
104 # the terms of the GNU General Public License as published by the Free Software
105 # Foundation; either version 2 of the License, or (at your option) any later
108 # This program is distributed in the hope that it will be useful, but WITHOUT
109 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
110 # FOR A PARTICULAR PURPOSE.
111 # See the GNU General Public License for more details.
113 # You should have received a copy of the GNU General Public License along with
115 # If not, see L<http://www.gnu.org/licenses/>.
117 # vim: set fenc=UTF-8 ft=perl fdm=marker ts=4 sw=4 sts=4 et fo+=w :