chiark
/
gitweb
/
~mdw
/
misc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Release 1.3.1.
[misc]
/
MdwOpt.pm
diff --git
a/MdwOpt.pm
b/MdwOpt.pm
index b268c15ea2da676e05dbeff566b0ed0e9a38771a..6ee8112f5f1b1ebdbde64512ed8be33c54b83f0c 100644
(file)
--- 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.
#
# 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
# 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
# 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
{
sub new
{
@@
-382,7
+382,7
@@
sub read
($opt,$self->{this})=(substr($self->{this},0,1),substr($self->{this},1));
$prefix=($self->{flags}{_neg} ? '+' : '-');
($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 '+'))
{
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);
}
return ('?',$self->err("option `$prefix$opt' requires an argument"))
unless defined($arg);
}
- }
+ }
$opt.='+' if $self->{flags}{_neg};
return ($opt,$arg);
$opt.='+' if $self->{flags}{_neg};
return ($opt,$arg);