summaryrefslogtreecommitdiff
path: root/fml
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-11-25 06:46:29 +0000
committerfukachan <fukachan>2001-11-25 06:46:29 +0000
commitd5e17a02dea3c6dd251f7ba2aebe657e44c3f5fc (patch)
tree60adb712d5c3b11b14218206873089f813052258 /fml
parent78cc03e492eceffafaf845ebaeb65a9febf8bd52 (diff)
downloadfml8-d5e17a02dea3c6dd251f7ba2aebe657e44c3f5fc.tar.gz
fml8-d5e17a02dea3c6dd251f7ba2aebe657e44c3f5fc.tar.bz2
fml8-d5e17a02dea3c6dd251f7ba2aebe657e44c3f5fc.zip
check whether getopt() options are given or not.
Diffstat (limited to 'fml')
-rw-r--r--fml/lib/FML/Process/Switch.pm14
1 files changed, 11 insertions, 3 deletions
diff --git a/fml/lib/FML/Process/Switch.pm b/fml/lib/FML/Process/Switch.pm
index 9b80c37f..7d779022 100644
--- a/fml/lib/FML/Process/Switch.pm
+++ b/fml/lib/FML/Process/Switch.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Switch.pm,v 1.43 2001/11/25 03:54:43 fukachan Exp $
+# $FML: Switch.pm,v 1.44 2001/11/25 05:13:22 fukachan Exp $
#
package FML::Process::Switch;
@@ -102,8 +102,16 @@ sub main::Bootstrap2
}
# 1.1 parse command line options (preliminary)
- use Getopt::Long;
- GetOptions(\%options, _module_specific_options($myname));
+ {
+ my $opt = _module_specific_options($myname);
+ if ($opt) {
+ eval q{
+ use Getopt::Long;
+ GetOptions(\%options, $opt);
+ };
+ croak($@) if $@;
+ }
+ }
# 2.1 analyze main.cf and get the result in $main_cf
use Standalone;