I have a regex that parses a string that should be a fully qualified module name for Raku (see below). Since only the auth, ver, and api versions seem to be used in the Precomp modules, I only test for those.
I need to separate out the name of the module from the identifiers.
My regex is:
my $rx := /
^
$<name> = ( [ \w | '::' ] + )
[ ':' $<part> = ( [ 'ver' | 'auth' | 'api' ] )
\< ~ \> $<val> = ( .*? ) ]*
$
/;
Question is whether there is a standard way to match to a Raku module, or a sub so that this regex does not become an error in the future.
It's probably the best if you use Zef::Identity
It's probably already installed in your system, since it's part of
zef