summaryrefslogtreecommitdiff
path: root/Dh_Getopt.pm
diff options
context:
space:
mode:
authorjoey <joey>1999-08-17 04:56:57 +0000
committerjoey <joey>1999-08-17 04:56:57 +0000
commit0a47c6cde2c9bca0f650b8731bb9fd11a7797f9e (patch)
tree7f84251a11d27330a34cb5237727e2fd361bce6c /Dh_Getopt.pm
parent8c9a7b69225a5dc4b97d03df01bd9f594a2870a1 (diff)
downloaddebhelper-0a47c6cde2c9bca0f650b8731bb9fd11a7797f9e.tar.gz
r109: Initial Import
Diffstat (limited to 'Dh_Getopt.pm')
-rw-r--r--Dh_Getopt.pm34
1 files changed, 11 insertions, 23 deletions
diff --git a/Dh_Getopt.pm b/Dh_Getopt.pm
index eb6aef98..85f0e15b 100644
--- a/Dh_Getopt.pm
+++ b/Dh_Getopt.pm
@@ -7,12 +7,12 @@
package Dh_Getopt;
use strict;
-use Exporter;
-my @ISA=qw(Exporter);
-my @EXPORT=qw(&parseopts);
-
use Dh_Lib;
use Getopt::Long;
+use Exporter;
+#use vars qw{@ISA @EXPORT};
+#@ISA=qw(Exporter);
+#@EXPORT=qw(&aparseopts); # FIXME: for some reason, this doesn't work.
my (%options, %exclude_package);
@@ -46,11 +46,6 @@ sub AddExclude { my($option,$value)=@_;
push @{$options{EXCLUDE}},$value;
}
-sub import {
- # Enable bundling of short command line options.
- Getopt::Long::config("bundling");
-}
-
# Parse options and return a hash of the values.
sub parseopts {
undef %options;
@@ -72,8 +67,8 @@ sub parseopts {
"no-package=s" => \&ExcludePackage,
"n" => \$options{NOSCRIPTS},
-# "noscripts" => \$options(NOSCRIPTS},
-
+ "noscripts" => \$options{NOSCRIPTS},
+
"x" => \$options{INCLUDE_CONFFILES}, # is -x for some unknown historical reason..
"include-conffiles" => \$options{INCLUDE_CONFFILES},
@@ -120,18 +115,6 @@ sub parseopts {
$options{V_FLAG_SET}=1;
}
- # Check to see if DH_VERBOSE environment variable was set, if so,
- # make sure verbose is on.
- if ($ENV{DH_VERBOSE} ne undef) {
- $options{VERBOSE}=1;
- }
-
- # Check to see if DH_NO_ACT environment variable was set, if so,
- # make sure no act mode is on.
- if ($ENV{DH_NO_ACT} ne undef) {
- $options{NO_ACT}=1;
- }
-
# Remove excluded packages from the list of packages to act on.
my @package_list;
my $package;
@@ -145,4 +128,9 @@ sub parseopts {
return %options;
}
+sub import {
+ # Enable bundling of short command line options.
+ Getopt::Long::config("bundling");
+}
+
1