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

AttrX::InitArg #288

Open
AlexDaniel opened this issue Aug 3, 2018 · 2 comments
Open

AttrX::InitArg #288

AlexDaniel opened this issue Aug 3, 2018 · 2 comments
Assignees
Labels
deprecated module The module should no longer be used

Comments

@AlexDaniel
Copy link
Member

AlexDaniel commented Aug 3, 2018

Module AttrX::InitArg is failing its tests and/or does not install.

  • Please close this issue only if the module passes its tests and is installable. One way to test it is to run zef install MODULENAME.
  • If you can install the module without any problems, label this ticket with works for me and close the issue.
  • If it needs a native library, put native dependency label, describe what you did to install it and ensure that same instructions are present in the README file of the module (otherwise submit a pull request). If everything is green you can close the issue.
  • If the module is broken, try to fix it and send a PR. Add PR sent label and close the issue.
  • If there is a problem in one of the dependencies, add failing dependency label and write a comment explaining the situation. Leave this ticket open and feel free to work on the corresponding ticket for the failing dependency.
  • It is a good idea to assign yourself to this ticket if you're working on it (to make sure two or more people are not working on the same ticket at the same time).

If you can't self-assign, attach a label, or close the ticket, please let us know on #perl6 channel on freenode or just leave a comment here. We will try to give you privileges as fast as possible.

@Xliff
Copy link

Xliff commented Aug 4, 2018

This module uses "is required" which doesn't look to be functioning properly.

There are no BUILD or TWEAK submethods specified. The proper thing to do would be to test the required value after TWEAK, but rakudo's current implementation checks it after BUILD.

The problem is that the expected class requires a private member, however you can't specify initialization of a private member via standard .new().

Trying to set it in build by passing a parameter, will always result in the "is required" trait being ignored, ala:

m: class A { has $!a is required; method BUILD(:$a) { $!a = $a } }; my $a1 = A.new(:a(2)); my $a2 = A.new;

Both $a1 and $a2 will not throw X::Attribute::Required

@Xliff Xliff self-assigned this Aug 4, 2018
@JJ JJ added the deprecated module The module should no longer be used label Aug 6, 2018
@JJ
Copy link
Collaborator

JJ commented Aug 6, 2018

Probably obsolete module. It's three years old.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecated module The module should no longer be used
Projects
None yet
Development

No branches or pull requests

3 participants