What is the purpose of adding a suffix: from <perl5> to the module name in the 'use' expression in Perl 6?

What is the purpose of using the instruction below which I came across some Perl 6 module?

use CGI:from<perl5>; ... ... 

The rest of the code is just a normal use of the CGI Perl 5 module, as far as I can tell.

Does the suffix "from from from" are used to invoke some level of Perl 5 compatibility. It seems there is no documentation for this.

+6
source share
1 answer

Look at perl6 Summary 11: Modules :

The use operator allows you to specify an additional language (or instead of it) so that you can use modules from other languages. From the adverb, any additional parts are also analyzed as short arguments. For instance:

 use Whiteness:from<perl5>:name<Acme::Bleach>:auth<cpan:DCONWAY>:ver<1.12>; use Whiteness:from<perl5 Acme::Bleach cpan:DCONWAY 1.12>; # same thing 

In fact, this is the "other languages" support scheme, perl5 in this case.

+9
source

Source: https://habr.com/ru/post/908246/


All Articles