# routine, although the interface is rather different, since it
# takes advantage of some of Perl's object-oriented features.
#
-#
+#
# How options parsing appears to users
#
# A command line consists of a number of `words' (which may
# permute Force permuting of the argument list
# inorder Read options in order
# posix Force use of POSIX option semantics
-# quiet Don't report errors when they happen
+# quiet Don't report errors when they happen
sub new
{
($opt,$self->{this})=(substr($self->{this},0,1),substr($self->{this},1));
$prefix=($self->{flags}{_neg} ? '+' : '-');
-
+
if ($self->{short} =~ /\Q$opt/ &&
(!$self->{flags}{_neg} || substr($',0,1) eq '+'))
{
return ('?',$self->err("option `$prefix$opt' requires an argument"))
unless defined($arg);
}
- }
+ }
$opt.='+' if $self->{flags}{_neg};
return ($opt,$arg);