This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
stevied can't figure this error out. got this: 07:20
`like 'blah', m:s/0 '-' Parent menu/, 'handles parent menu';`
it's a test
I get this nasty error:
```
Use of uninitialized value of type Any in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
in block <unit> at /Users/stevedondley/git_repos/raku/modules/steve/Menu-Simple/t/02-sorting.rakutest line 22
Cannot resolve caller like(Str:D, Nil:U, Str:D); none of these signatures matches:
(Str(Any) $got, Regex:D $expected, $desc = Code.new)
in block <unit> at /Users/stevedondley/git_repos/raku/modules/steve/Menu-Simple/t/02-sorting.rakutest line 22
```
Nemokosch you match against $_ actually, I suppose 07:22
stevied why is my regex a Nil:U
Nemokosch because it's not a regex
stevied don't get this error if I take out the `m:s` modifier 07:23
Nemokosch it's a failed match call
YES, exactly
the m:s modifier makes it a call, rather than a regex 07:24
and that call fails
= first error
you get Nil from it
stevied I see
Nemokosch = second error
stevied so how do I fix?
Nemokosch why did you want to put m:s there in the first place?
stevied so I can just type in spaces
easier
Nemokosch what about rx:s? 07:25
stevied ok, that did it 07:26
I assumed the 'm' stood for modifier but I guess it stands for match
thanks!
Nemokosch it does stand for match 07:27
stevied yeah, i thought it was acting as some kind of delimiter to start the modifer string 07:28
Nemokosch yeah nah 07:30
that's specifically for matching 07:31
docs.raku.org/language/regexes#Ano...ion_syntax 07:32
> Secondly, the rx form allows you to insert regex adverbs between rx and the opening delimiter to modify the definition of the entire regex. This is equivalent to inserting the adverb at the beginning of the regex, but may be clearer:
so supposedly you could do /:s 0 '-' Parent menu/ as well?
but yeah perhaps rx:s does look better
stevied huh 07:33
regexes and oo trip me up the most. they are similar to Perl/Moose but very different. 07:38
Nemokosch I don't use oo so that's one down 😄 07:45
stevied so what's the process for getting a pull request approved in a community module? I got this one pending: github.com/raku-community-modules/...put/pull/8
who else reviews it?