X-Git-Url: https://git.distorted.org.uk/~mdw/misc/blobdiff_plain/e063712b9d335fffae64f418af5abd0b51a512d1..6365546c0d33c0842b4afd341314a5bfde173bff:/MdwOpt.pm diff --git a/MdwOpt.pm b/MdwOpt.pm index b268c15..6ee8112 100644 --- a/MdwOpt.pm +++ b/MdwOpt.pm @@ -39,7 +39,7 @@ require Exporter; # 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 @@ -166,7 +166,7 @@ require Exporter; # 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 { @@ -382,7 +382,7 @@ sub read ($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 '+')) { @@ -401,7 +401,7 @@ sub read return ('?',$self->err("option `$prefix$opt' requires an argument")) unless defined($arg); } - } + } $opt.='+' if $self->{flags}{_neg}; return ($opt,$arg);