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

Fix RT #73556 T::MO::Extends->mock should preserve prototype #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dolmen
Copy link
Contributor

@dolmen dolmen commented Dec 30, 2011

Test case & fix for RT#73556.

Attributes (such as lvalue) are still to do, but I have yet no idea of how to do it.

Review on Reviewable

RT #73556: Test::MockObject::Extends->mock should duplicate prototype
This test case shows the problem: a 'Prototype mismatch' warning is
raised when a method declared with a prototype is replaced with a mock.
The problem comes from the mock() implementation that wraps the mock in
a sub without prototype.
The same kind of problem occurs for subs with attributes (lvalue for
example).
This work has been sponsored by Ijenko.
Still TODO: preserve lvalue attribute
@dolmen
Copy link
Contributor Author

dolmen commented Dec 30, 2011

RT #73556

@@ -0,0 +1,48 @@
use 5.010;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you force to use 5.10 here? AFAIK there no such requirements for the module?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the catch!

@dolmen
Copy link
Contributor Author

dolmen commented May 28, 2015

@chromatic Could you review this patch?

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

Successfully merging this pull request may close these issues.

2 participants