Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require with non-sigiled arguments #43

Closed
vrurg opened this issue Jun 18, 2019 · 1 comment
Closed

require with non-sigiled arguments #43

vrurg opened this issue Jun 18, 2019 · 1 comment
Assignees
Labels
language Changes to the Raku Programming Language

Comments

@vrurg
Copy link
Contributor

vrurg commented Jun 18, 2019

Followup to rakudo/rakudo#2983.

Currently require with arguments is supposed to import specified symbols into its lexical scope. The thing which is not specified in the documentation is that the symbols are treated as variables. What happens then is that if a role is requested for import:

require ("module.pm") <a_role>;

rakudo installs a same-name variable a_role. I wonder if its a legit behavior or not? On one hand, we could allow only sigiled entities to import. But this would effectively cut off constants. Though they're not correctly imported now anyway.

Another way is to allow sigilless symbols to be required. But this needs installing a symbol stub which could be resolved at run-time by REQUIRE_IMPORT. So far, I didn't find a way how this could be done.

@AlexDaniel AlexDaniel added the language Changes to the Raku Programming Language label Jun 18, 2019
@vrurg
Copy link
Contributor Author

vrurg commented Aug 25, 2019

This was resolved with several bugfixes in rakudo.

@vrurg vrurg closed this as completed Aug 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language Changes to the Raku Programming Language
Projects
None yet
Development

No branches or pull requests

3 participants