Rakudo::Version

provide a "rakudo version" pragma

NAME

Rakudo::Version - provide a "rakudo version" pragma

SYNOPSIS

# fixed version means >=
use rakudo v2022.01;

# version with qualifier checks with >
use rakudo v2022.01+;

# 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"
}

DESCRIPTION

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 specifiying a Version value (which can either be a fixed version, or a less specific version with qualifiers). 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.

PRIOR ART

The RakudoPrereq module, originally by Zoffix Znet, provides a more general approach to the problem of limiting a program to a specific release.

AUTHOR

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 AND LICENSE

Copyright 2023 Elizabeth Mattijsen

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

Rakudo::Version v0.0.2

provide a "rakudo version" pragma

Authors

  • Elizabeth Mattijsen

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • rakudo

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.