diff options
author | Sergei Vyshenski <svysh.fbsd@gmail.com> | 2021-07-28 09:27:20 +0000 |
---|---|---|
committer | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2021-07-28 09:27:20 +0000 |
commit | c0a39d980d0f1f2c72c4c00f6346c08acd949b60 (patch) | |
tree | dd1fadf6eb98b0b4de4e35e2fe63fb6c00301227 | |
parent | 6ff413b090cc1eb3e193174cc10d479c3d3f6b03 (diff) | |
download | ports-c0a39d980d0f1f2c72c4c00f6346c08acd949b60.tar.gz ports-c0a39d980d0f1f2c72c4c00f6346c08acd949b60.zip |
devel/p5-Mock-MonkeyPatch: (NEW) Monkey patching with test mocking in mind
PR: 257466
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/p5-Mock-MonkeyPatch/Makefile | 25 | ||||
-rw-r--r-- | devel/p5-Mock-MonkeyPatch/distinfo | 3 | ||||
-rw-r--r-- | devel/p5-Mock-MonkeyPatch/pkg-descr | 12 | ||||
-rw-r--r-- | devel/p5-Mock-MonkeyPatch/pkg-plist | 2 |
5 files changed, 43 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 1f1e02792982..da57957d26f0 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -2737,6 +2737,7 @@ SUBDIR += p5-Mixin-Linewise SUBDIR += p5-Mknod SUBDIR += p5-Mo + SUBDIR += p5-Mock-MonkeyPatch SUBDIR += p5-Mock-Quick SUBDIR += p5-Module-Build SUBDIR += p5-Module-Build-Convert diff --git a/devel/p5-Mock-MonkeyPatch/Makefile b/devel/p5-Mock-MonkeyPatch/Makefile new file mode 100644 index 000000000000..8363fe73499e --- /dev/null +++ b/devel/p5-Mock-MonkeyPatch/Makefile @@ -0,0 +1,25 @@ +# Created by: Sergei Vyshenski <svysh.fbsd@gmail.com> + +PORTNAME= Mock-MonkeyPatch +PORTVERSION= 1.02 +CATEGORIES= devel perl5 +MASTER_SITES= CPAN +MASTER_SITE_SUBDIR= CPAN:JBERGER +PKGNAMEPREFIX= p5- + +MAINTAINER= svysh.fbsd@gmail.com +COMMENT= Monkey patching with test mocking in mind + +LICENSE= ART10 GPLv1+ +LICENSE_COMB= dual +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${RUN_DEPENDS} +RUN_DEPENDS= p5-Scalar-List-Utils>=1.56:lang/p5-Scalar-List-Utils + +USES= perl5 +USE_PERL5= modbuildtiny + +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/devel/p5-Mock-MonkeyPatch/distinfo b/devel/p5-Mock-MonkeyPatch/distinfo new file mode 100644 index 000000000000..48ed3b3e06e8 --- /dev/null +++ b/devel/p5-Mock-MonkeyPatch/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1627428368 +SHA256 (Mock-MonkeyPatch-1.02.tar.gz) = c5b6944ca54fe8355737673060ed4e9ef8723726577d796e1cae5e56bf1b0181 +SIZE (Mock-MonkeyPatch-1.02.tar.gz) = 15294 diff --git a/devel/p5-Mock-MonkeyPatch/pkg-descr b/devel/p5-Mock-MonkeyPatch/pkg-descr new file mode 100644 index 000000000000..b11db0b41287 --- /dev/null +++ b/devel/p5-Mock-MonkeyPatch/pkg-descr @@ -0,0 +1,12 @@ +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 diff --git a/devel/p5-Mock-MonkeyPatch/pkg-plist b/devel/p5-Mock-MonkeyPatch/pkg-plist new file mode 100644 index 000000000000..05d22bd48c58 --- /dev/null +++ b/devel/p5-Mock-MonkeyPatch/pkg-plist @@ -0,0 +1,2 @@ +%%SITE_PERL%%/Mock/MonkeyPatch.pm +%%PERL5_MAN3%%/Mock::MonkeyPatch.3.gz |