Changeset 1240
- Timestamp:
- 2000-06-26T14:29:35+12:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/parsargv.pm
r1239 r1240 72 72 my %option; 73 73 74 <<<<<<< parsargv.pm75 74 my @rest = @_; 76 75 … … 93 92 while (($spec, $var) = splice(@rest, 0, 2)) 94 93 { 95 =======96 # if the last argument is the string "allow_extra_options" then options97 # in \@_ without a corresponding SPEC will be ignored (i.e. the "$arg is98 # not a valid option" error won't occur)\n";99 my $allow_extra_options = pop @_;100 if (defined ($allow_extra_options)) {101 if ($allow_extra_options eq "allow_extra_options") {102 $allow_extra_options = 1;103 } else {104 # put it back where we got it105 push (@_, $allow_extra_options);106 $allow_extra_options = 0;107 }108 } else {109 $allow_extra_options = 0;110 }111 112 while (($spec, $var) = splice(@_, 0, 2))113 {114 >>>>>>> 1.3115 94 die "Variable for $spec is not a valid type." 116 95 unless ref($var) eq 'SCALAR' || ref($var) eq 'ARRAY';
Note:
See TracChangeset
for help on using the changeset viewer.