Created attachment 226749 [details]
"git diff" for new port
Monkey patching with test mocking in mind.
Mocking is a common tool, especially for testing. By strategically
replacing a subroutine, one can isolate segments (units) of code to
test individually. When this is done it is important to know that the
mocked sub was actually called and with what arguments it was called.
Mock::MonkeyPatch injects a subroutine in the place of an existing one.
It returns an object by which you can revisit the manner in which the
mocked subroutine was called. Further when the object goes out of scope
(or when the "restore" method is called) the original subroutine is
- This port is needed as a new dependency for existing port
- "portlint -ACN" is happy.
- "portclippy Makefile" is happy.
- Tested with:
- built-in perl tests in a clean poudriere jail say: PASS.
A commit in branch main references this bug:
Author: Sergei Vyshenski <email@example.com>
AuthorDate: 2021-07-28 09:27:20 +0000
Commit: Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2021-07-28 09:27:20 +0000
devel/p5-Mock-MonkeyPatch: (NEW) Monkey patching with test mocking in mind
devel/Makefile | 1 +
devel/p5-Mock-MonkeyPatch/Makefile (new) | 25 +++++++++++++++++++++++++
devel/p5-Mock-MonkeyPatch/distinfo (new) | 3 +++
devel/p5-Mock-MonkeyPatch/pkg-descr (new) | 12 ++++++++++++
devel/p5-Mock-MonkeyPatch/pkg-plist (new) | 2 ++
5 files changed, 43 insertions(+)