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 replaced. WWW: https://metacpan.org/dist/Mock-MonkeyPatch - This port is needed as a new dependency for existing port devel/p5-Workflow - "portlint -ACN" is happy. - "portclippy Makefile" is happy. - Tested with: 13.0-RELEASE-p3 pkg 1.16.3 poudriere 3.3.6 perl 5.32.1 openssl 1.1.1k ssl=base - built-in perl tests in a clean poudriere jail say: PASS.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c0a39d980d0f1f2c72c4c00f6346c08acd949b60 commit c0a39d980d0f1f2c72c4c00f6346c08acd949b60 Author: Sergei Vyshenski <svysh.fbsd@gmail.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 PR: 257466 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(+)