From d5e17a02dea3c6dd251f7ba2aebe657e44c3f5fc Mon Sep 17 00:00:00 2001 From: fukachan Date: Sun, 25 Nov 2001 06:46:29 +0000 Subject: check whether getopt() options are given or not. --- fml/lib/FML/Process/Switch.pm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'fml') 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; -- cgit v1.2.1