This is more of how I would structure it
with %CommandLine<backup_path> {
.say;
# if /^ '[' .*? ']' / {
if .starts-with('[') && .contains(']') {
...
}
} else {
say 'no backup path given'
}
We can skip checking 「.starts-with」 and 「.contains」 if there isn't anything
to start with.
On Tue, May 26, 2020 at 4:54 PM yary <[email protected]> wrote:
> From this much
>
> 158: Cannot resolve caller
> index(Str:U: Str:D); none of these signatures match:
>
> "index" is being called with the 1st arg undefined, 2nd arg defined. There
> is no "index" multi handling the 1st undefined arg, is my guess.
>
> -y
>
>
> On Tue, May 26, 2020 at 4:41 AM ToddAndMargo via perl6-users <
> [email protected]> wrote:
>
>> On 2020-05-26 01:37, ToddAndMargo via perl6-users wrote:
>> > 155: A:\YourDocs\backup1
>> > 156: No
>> > 157: No
>> >
>> > 158: Cannot resolve caller
>> > index(Str:U: Str:D); none of these signatures match:
>> > (List:D: Cool:D $needle, *%_)
>>
>>
>> I wonder what that was all about. Looked fine on my screen:
>>
>> 155: A:\YourDocs\backup1
>> 156: No
>> 157: No
>>
>> 158: Cannot resolve caller
>> index(Str:U: Str:D); none of these signatures match:
>> ...
>> (List:D: Cool:D $needle, *%_)
>> in sub GatherOptions at CobianWrapper.pl6 line 158
>>
>