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

sub EXPORT must not use %() #3910

Closed
vrurg opened this issue Jul 2, 2021 · 1 comment
Closed

sub EXPORT must not use %() #3910

vrurg opened this issue Jul 2, 2021 · 1 comment
Labels
bug Error of some kind, from a typo to errors in the examples. docs Documentation issue (primary issue type)

Comments

@vrurg
Copy link

vrurg commented Jul 2, 2021

Documentation of sub EXPORT still uses %() to return exported symbols. This is considered incorrect behavior due to hashes itemizing their values. I.e. instead of, say, exporting a routine a symbol is exported as a Scalar containing a routine.

Correct examples must use Map.new instead of hash:

sub EXPORT {
    Map.new: '&doit' => sub { ... },
        ...
}

Sorry for not producing a PR, don't have time for it.

@vrurg vrurg added the docs Documentation issue (primary issue type) label Jul 2, 2021
@gfldex
Copy link
Contributor

gfldex commented Jul 2, 2021

Discussion can be found here: https://logs.liz.nl/raku-dev/2021-07-02.html#23:31

@JJ JJ added the bug Error of some kind, from a typo to errors in the examples. label Jul 3, 2021
JJ added a commit to JJ/my-raku-examples that referenced this issue Jul 3, 2021
JJ added a commit to JJ/my-raku-examples that referenced this issue Jul 3, 2021
JJ added a commit that referenced this issue Jul 3, 2021
JJ added a commit that referenced this issue Jul 3, 2021
Also rephrases and expands a bit explanation.
@JJ JJ closed this as completed in 82ae2e9 Jul 3, 2021
JJ added a commit to JJ/my-raku-examples that referenced this issue Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Error of some kind, from a typo to errors in the examples. docs Documentation issue (primary issue type)
Projects
None yet
Development

No branches or pull requests

3 participants