Version
ErrorsCollection

Version

Synthesised documentation from type/Str

From type/Str

See Original text in context

method Version(Str:D: --> Version:D)

Coerces the string to Version.

This could be used for type coercion in signature, as for example:

sub f(Version(Str$want-version{ say $want-version.^name };
f "1.2.3";  # OUTPUT: «Version␤»

Note: Available since version 6.e (2020.01 and later).