aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2022-10-09 15:19:06 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2022-10-09 15:37:42 +0000
commitb91a0f27766668817a5b6aa5148b245095e9dab5 (patch)
tree34664f905f9dccc5af446ce38e72842602483ee0
parentb6f44a0961189dc29cb0e270500cd46ae124e5c1 (diff)
downloadports-b91a0f27766668817a5b6aa5148b245095e9dab5.tar.gz
ports-b91a0f27766668817a5b6aa5148b245095e9dab5.zip
devel/p5-MooseX-Role-WarnOnConflict: Add p5-MooseX-Role-WarnOnConflict 0.01
When using Moose::Role, a class which provides a method a role provides will silently override that method. This can cause strange, hard-to-debug errors when the role's methods are not called. Simply use MooseX::Role::WarnOnConflict instead of Moose::Role and overriding a role's method becomes a composition-time warning. See the synopsis for a resolution.
-rw-r--r--devel/Makefile1
-rw-r--r--devel/p5-MooseX-Role-WarnOnConflict/Makefile24
-rw-r--r--devel/p5-MooseX-Role-WarnOnConflict/distinfo3
-rw-r--r--devel/p5-MooseX-Role-WarnOnConflict/pkg-descr5
-rw-r--r--devel/p5-MooseX-Role-WarnOnConflict/pkg-plist4
5 files changed, 37 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 04aa6288b48f..0370c74b9f90 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -2912,6 +2912,7 @@
SUBDIR += p5-MooseX-Role-Matcher
SUBDIR += p5-MooseX-Role-Parameterized
SUBDIR += p5-MooseX-Role-Strict
+ SUBDIR += p5-MooseX-Role-WarnOnConflict
SUBDIR += p5-MooseX-Runnable
SUBDIR += p5-MooseX-SemiAffordanceAccessor
SUBDIR += p5-MooseX-SetOnce
diff --git a/devel/p5-MooseX-Role-WarnOnConflict/Makefile b/devel/p5-MooseX-Role-WarnOnConflict/Makefile
new file mode 100644
index 000000000000..8766a44452ee
--- /dev/null
+++ b/devel/p5-MooseX-Role-WarnOnConflict/Makefile
@@ -0,0 +1,24 @@
+PORTNAME= MooseX-Role-WarnOnConflict
+PORTVERSION= 0.01
+CATEGORIES= devel perl5
+MASTER_SITES= CPAN
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Warn if classes override role methods without excluding them
+WWW= https://metacpan.org/dist/MooseX-Role-WarnOnConflict
+
+LICENSE= ART20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${RUN_DEPENDS}
+RUN_DEPENDS= p5-Moose>=0:devel/p5-Moose
+TEST_DEPENDS= p5-Capture-Tiny>=0:devel/p5-Capture-Tiny \
+ p5-Test-Most>=0:devel/p5-Test-Most
+
+USES= perl5
+USE_PERL5= configure
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/devel/p5-MooseX-Role-WarnOnConflict/distinfo b/devel/p5-MooseX-Role-WarnOnConflict/distinfo
new file mode 100644
index 000000000000..4b13aa3c7b2f
--- /dev/null
+++ b/devel/p5-MooseX-Role-WarnOnConflict/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1665073066
+SHA256 (MooseX-Role-WarnOnConflict-0.01.tar.gz) = 5547750f239db63b23d3027a07dbb16fd01a220d681e4f61624e6851401463c3
+SIZE (MooseX-Role-WarnOnConflict-0.01.tar.gz) = 11365
diff --git a/devel/p5-MooseX-Role-WarnOnConflict/pkg-descr b/devel/p5-MooseX-Role-WarnOnConflict/pkg-descr
new file mode 100644
index 000000000000..8133954d4afe
--- /dev/null
+++ b/devel/p5-MooseX-Role-WarnOnConflict/pkg-descr
@@ -0,0 +1,5 @@
+When using Moose::Role, a class which provides a method a role provides will
+silently override that method. This can cause strange, hard-to-debug errors when
+the role's methods are not called. Simply use MooseX::Role::WarnOnConflict
+instead of Moose::Role and overriding a role's method becomes a composition-time
+warning. See the synopsis for a resolution.
diff --git a/devel/p5-MooseX-Role-WarnOnConflict/pkg-plist b/devel/p5-MooseX-Role-WarnOnConflict/pkg-plist
new file mode 100644
index 000000000000..4deaffd10feb
--- /dev/null
+++ b/devel/p5-MooseX-Role-WarnOnConflict/pkg-plist
@@ -0,0 +1,4 @@
+%%SITE_PERL%%/MooseX/Meta/Role/WarnOnConflict.pm
+%%SITE_PERL%%/MooseX/Role/WarnOnConflict.pm
+%%PERL5_MAN3%%/MooseX::Meta::Role::WarnOnConflict.3.gz
+%%PERL5_MAN3%%/MooseX::Role::WarnOnConflict.3.gz