We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please document that it is possible to assign a reference to a named subroutine to a key to mock a method:
my $obj = qobj( some_method => \&some_sub, );
I had to dig up the implementation of AUTOLOAD to verify that this was indeed the case.
Use case: trying out a component when another component/embedded object isn't written yet, except for that one subroutine.
And even more importantly perhaps, document that in order to have a method return a coderef you have to say:
method_returning_coderef => qmeth { \&some_sub },
The text was updated successfully, but these errors were encountered:
On closer inspection it doesn't work! X-(
You have to do
some_method => qmeth { goto &some_sub },
Which however ought to be documented though! :-)
Sorry, something went wrong.
No branches or pull requests
Please document that it is possible to assign a reference to a named subroutine to a key to mock a method:
I had to dig up the implementation of AUTOLOAD to verify that this was indeed the case.
Use case: trying out a component when another component/embedded object isn't written yet, except for that one subroutine.
And even more importantly perhaps, document that in order to have a method return a coderef you have to say:
The text was updated successfully, but these errors were encountered: