Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
RT #115744 - "--" should stop MAIN arg processing
  • Loading branch information
coke committed Aug 26, 2015
1 parent deb7b86 commit a7c845c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/Main.pm
Expand Up @@ -41,9 +41,11 @@ my sub MAIN_HELPER($retval = 0) {
# Convert raw command line args into positional and named args for MAIN
my sub process-cmd-args (@args is copy) {
my (@positional-arguments, %named-arguments);
my $stopped = False;
while (@args) {
my $passed-value = @args.shift;
if $passed-value ~~ /^ ( '--' | '-' | ':' ) ('/'?) (<-[0..9\.]> .*) $/ {
$stopped = $passed-value eq '--';
if !$stopped && $passed-value ~~ /^ ( '--' | '-' | ':' ) ('/'?) (<-[0..9\.]> .*) $/ {
my ($switch, $negate, $arg) = (~$0, ?((~$1).chars), ~$2);

with $arg.index('=') {
Expand Down

0 comments on commit a7c845c

Please sign in to comment.