Help language development. Donate to The Perl Foundation
Rakudo::Version - provide a "rakudo version" pragma
# Exactly this version use rakudo v2022.01; # From this version onward use rakudo v2023.02+; # More elaborate checks with a Callable use rakudo { $_ ~~ v2022.01 || $_ ~~ v2022.07+ } # Custom error message use rakudo { $_ ~~ v2022.07+ || die "$_ is not recent enough for this" }
The Rakudo::Version distribution provides a use rakudo
pragma that allows one to specify with which version of Rakudo a program is supposed to run.
Version checking occurs either by specifying a Version
value (which will be smart-matched with the current compiler Version
), or it can be a Callable
which will be given the current Version
value, and which should return a Bool
indicating whether or not the Rakudo release is acceptable.
The RakudoPrereq module, originally by Zoffix Znet
, provides a more general approach to the problem of limiting a program to a specific release.
Elizabeth Mattijsen [email protected]
Source can be located at: https://github.com/lizmat/Rakudo-Version . Comments and Pull Requests are welcome.
If you like this module, or what I’m doing more generally, committing to a small sponsorship would mean a great deal to me!
Copyright 2023 Elizabeth Mattijsen
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.