pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/p5-circular-require Adding package for CPAN dist...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6dbfa7d218ff
branches:  trunk
changeset: 620907:6dbfa7d218ff
user:      sno <sno%pkgsrc.org@localhost>
date:      Wed Jul 03 08:41:29 2013 +0000

description:
Adding package for CPAN distribution circular-require version 0.10 into
devel/p5-circular-require.

Perl by default just ignores cycles in require statements - if Foo.pm does
use Bar and Bar.pm does use Foo, doing use Foo elsewhere will start loading
Foo.pm, then hit the use statement, start loading Bar.pm, hit the use
statement, notice that Foo.pm has already started loading and ignore it,
and continue loading Bar.pm. But Foo.pm hasn't finished loading yet, so if
Bar.pm uses anything from Foo.pm (which it likely does, if it's loading it),
those won't be accessible while the body of Bar.pm is being executed. This
can lead to some very confusing errors, especially if introspection is
happening at load time (make_immutable in Moose classes, for example). This
module generates a warning whenever a module is skipped due to being loaded,
if that module has not finished executing.

This module works as a pragma, and typically pragmas have lexical scope.
Lexical scope doesn't make a whole lot of sense for this case though,
because the effect it's tracking isn't lexical (what does it mean to disable
the pragma inside of a cycle vs. outside of a cycle? does disabling it
within a cycle cause it to always be disabled for that cycle, or only if
it's disabled at the point where the warning would otherwise be generated?
etc.), but dynamic scope (the scope that, for instance, local uses) does,
and that's how this module works. Saying no circular::require enables the
module for the current dynamic scope, and use circular::require disables
it for the current dynamic scope. Hopefully, this will just do what you mean.

diffstat:

 devel/p5-circular-require/DESCR    |  22 ++++++++++++++++++++++
 devel/p5-circular-require/Makefile |  20 ++++++++++++++++++++
 devel/p5-circular-require/distinfo |   5 +++++
 3 files changed, 47 insertions(+), 0 deletions(-)

diffs (59 lines):

diff -r 9c7e3a9fd422 -r 6dbfa7d218ff devel/p5-circular-require/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/p5-circular-require/DESCR   Wed Jul 03 08:41:29 2013 +0000
@@ -0,0 +1,22 @@
+Perl by default just ignores cycles in require statements - if Foo.pm does
+use Bar and Bar.pm does use Foo, doing use Foo elsewhere will start loading
+Foo.pm, then hit the use statement, start loading Bar.pm, hit the use
+statement, notice that Foo.pm has already started loading and ignore it,
+and continue loading Bar.pm. But Foo.pm hasn't finished loading yet, so if
+Bar.pm uses anything from Foo.pm (which it likely does, if it's loading it),
+those won't be accessible while the body of Bar.pm is being executed. This
+can lead to some very confusing errors, especially if introspection is
+happening at load time (make_immutable in Moose classes, for example). This
+module generates a warning whenever a module is skipped due to being loaded,
+if that module has not finished executing.
+
+This module works as a pragma, and typically pragmas have lexical scope.
+Lexical scope doesn't make a whole lot of sense for this case though,
+because the effect it's tracking isn't lexical (what does it mean to disable
+the pragma inside of a cycle vs. outside of a cycle? does disabling it
+within a cycle cause it to always be disabled for that cycle, or only if
+it's disabled at the point where the warning would otherwise be generated?
+etc.), but dynamic scope (the scope that, for instance, local uses) does,
+and that's how this module works. Saying no circular::require enables the
+module for the current dynamic scope, and use circular::require disables
+it for the current dynamic scope. Hopefully, this will just do what you mean.
diff -r 9c7e3a9fd422 -r 6dbfa7d218ff devel/p5-circular-require/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/p5-circular-require/Makefile        Wed Jul 03 08:41:29 2013 +0000
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile,v 1.1 2013/07/03 08:41:29 sno Exp $
+
+DISTNAME=      circular-require-0.10
+PKGNAME=       p5-${DISTNAME}
+CATEGORIES=    devel perl5
+MASTER_SITES=  ${MASTER_SITE_PERL_CPAN:=../../authors/id/D/DO/DOY/}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      http://search.cpan.org/dist/circular-require/
+COMMENT=       Perl5 module to detect circularity in use/require statements
+LICENSE=       ${PERL5_LICENSE}
+
+DEPENDS+=      p5-Package-Stash-[0-9]*:../../devel/p5-Package-Stash
+
+PKG_INSTALLATION_TYPES=        overwrite pkgviews
+
+PERL5_PACKLIST=                auto/circular/require/.packlist
+
+.include "../../lang/perl5/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 9c7e3a9fd422 -r 6dbfa7d218ff devel/p5-circular-require/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/p5-circular-require/distinfo        Wed Jul 03 08:41:29 2013 +0000
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1 2013/07/03 08:41:29 sno Exp $
+
+SHA1 (circular-require-0.10.tar.gz) = caece9686811b4e0f5172987f04c0b5b6b1a442c
+RMD160 (circular-require-0.10.tar.gz) = 040969da489eac0e3909f4df77a5ee0c7c89da3c
+Size (circular-require-0.10.tar.gz) = 17053 bytes



Home | Main Index | Thread Index | Old Index