Subject: | new range feature. CTL_AMAX, argcnt checking against -1 |
I love the new range functionality. I found a bug when using the undefined max range like in the example. I even found a fix. : )
GetOptions('rgbcolor=s{2,}' => \@color);
The debugger shows $ma gets set to -1 ... cool.
$argcnt++;
last if $argcnt >= $ctl->[CTL_AMAX] && $ctl->[CTL_AMAX] != -1;
undef($arg);
When I step through to here, argcnt=1 and ctl->[CTL_AMAX] = -1.
Show quoted text
1>-1 so it incorrectly aborted early. the && accounts for the possible -1 value.
Works. : )
Thanks again
- Ryan