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

Methods in roles don't work with leading/trailing declarative docs #4287

Closed
p6rt opened this issue Jun 1, 2015 · 4 comments
Closed

Methods in roles don't work with leading/trailing declarative docs #4287

p6rt opened this issue Jun 1, 2015 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Jun 1, 2015

Migrated from rt.perl.org#125304 (status was 'resolved')

Searchable as RT125304$

@p6rt
Copy link
Author

p6rt commented Jun 1, 2015

From @hoelzro

As seen in S26-documentation/block-leading.t and S26-documentation/block-trailing.t​:

role Boxer {
#|{Robert De Niro}
method actor { }
}

my $method = Boxer.^find_method('actor');
say $method.WHY; # should be "Robert De Niro"

=begin output
(Any)
=end output

This test has been failing since d9246fdab869d799f9b28552e2c6a7c16a0a4810, because that commit made .^ no longer pun roles. Role puns successfully return a Method whose WHY is correct; RolePunning.find_method returns a wrapper code that has no WHY. Unfortunately, since the wrapper is an NQP anonymous function, we can't set its WHY.

@p6rt
Copy link
Author

p6rt commented Jun 1, 2015

From @hoelzro

On Mon Jun 01 11​:07​:38 2015, rob@​hoelz.ro wrote​:

As seen in S26-documentation/block-leading.t and S26-
documentation/block-trailing.t​:

role Boxer {
#|{Robert De Niro}
method actor { }
}

my $method = Boxer.^find_method('actor');
say $method.WHY; # should be "Robert De Niro"

=begin output
(Any)
=end output

This test has been failing since
d9246fdab869d799f9b28552e2c6a7c16a0a4810, because that commit made .^
no longer pun roles. Role puns successfully return a Method whose WHY
is correct; RolePunning.find_method returns a wrapper code that has no
WHY. Unfortunately, since the wrapper is an NQP anonymous function,
we can't set its WHY.

There should also be a test for multi methods in roles to make sure their WHYs pass on properly.

@p6rt
Copy link
Author

p6rt commented Jun 3, 2015

From @hoelzro

Fixed in roast via commit e9f12db

@p6rt p6rt closed this as completed Jun 3, 2015
@p6rt
Copy link
Author

p6rt commented Jun 3, 2015

@hoelzro - Status changed from 'new' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant