git: b91a0f277666 - main - devel/p5-MooseX-Role-WarnOnConflict: Add p5-MooseX-Role-WarnOnConflict 0.01
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 09 Oct 2022 15:38:52 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=b91a0f27766668817a5b6aa5148b245095e9dab5
commit b91a0f27766668817a5b6aa5148b245095e9dab5
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-10-09 15:19:06 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-10-09 15:37:42 +0000
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.
---
devel/Makefile | 1 +
devel/p5-MooseX-Role-WarnOnConflict/Makefile | 24 ++++++++++++++++++++++++
devel/p5-MooseX-Role-WarnOnConflict/distinfo | 3 +++
devel/p5-MooseX-Role-WarnOnConflict/pkg-descr | 5 +++++
devel/p5-MooseX-Role-WarnOnConflict/pkg-plist | 4 ++++
5 files changed, 37 insertions(+)
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