diff options
author | sno <sno@pkgsrc.org> | 2012-09-10 09:58:38 +0000 |
---|---|---|
committer | sno <sno@pkgsrc.org> | 2012-09-10 09:58:38 +0000 |
commit | 797fbe06243acea0e1d154fde7a64765185f2446 (patch) | |
tree | 1b68e9176018bf07b48c9b002ffcddb26ccea864 /devel | |
parent | 6c12d665cacb59e00cf043f417c897ad0dcabe2c (diff) | |
download | pkgsrc-797fbe06243acea0e1d154fde7a64765185f2446.tar.gz |
Importing package for CPAN module MooseX::Has::Options version 0.002 into
devel/p5-MooseX-Has-Options.
MooseX::Has::Options provides a succinct syntax for declaring options for
Moose attributes. It hijacks the has function imported by Moose and replaces
it with one that understands following options syntax:
use Moose;
use MooseX::Has::Options;
has 'some_attribute' => (
qw(:ro :required),
isa => 'Str',
...
);
This will converted into:
use Moose;
use MooseX::Has::Options;
has 'some_attribute' => (
is => 'ro',
required => 1,
isa => 'Str',
...
);
Options must come in the beginning of the argument list.
MooseX::Has::Options will stop searching for options after the
first alphanumeric string that does not start with a colon.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/p5-MooseX-Has-Options/DESCR | 28 | ||||
-rw-r--r-- | devel/p5-MooseX-Has-Options/Makefile | 26 | ||||
-rw-r--r-- | devel/p5-MooseX-Has-Options/distinfo | 5 |
3 files changed, 59 insertions, 0 deletions
diff --git a/devel/p5-MooseX-Has-Options/DESCR b/devel/p5-MooseX-Has-Options/DESCR new file mode 100644 index 00000000000..d562f86d48c --- /dev/null +++ b/devel/p5-MooseX-Has-Options/DESCR @@ -0,0 +1,28 @@ +MooseX::Has::Options provides a succinct syntax for declaring options for +Moose attributes. It hijacks the has function imported by Moose and replaces +it with one that understands following options syntax: + + use Moose; + use MooseX::Has::Options; + + has 'some_attribute' => ( + qw(:ro :required), + isa => 'Str', + ... + ); + +This will converted into: + + use Moose; + use MooseX::Has::Options; + + has 'some_attribute' => ( + is => 'ro', + required => 1, + isa => 'Str', + ... + ); + +Options must come in the beginning of the argument list. +MooseX::Has::Options will stop searching for options after the +first alphanumeric string that does not start with a colon. diff --git a/devel/p5-MooseX-Has-Options/Makefile b/devel/p5-MooseX-Has-Options/Makefile new file mode 100644 index 00000000000..885a8af54f7 --- /dev/null +++ b/devel/p5-MooseX-Has-Options/Makefile @@ -0,0 +1,26 @@ +# $NetBSD: Makefile,v 1.1 2012/09/10 09:58:38 sno Exp $ +# + +DISTNAME= MooseX-Has-Options-0.002 +PKGNAME= p5-${DISTNAME} +CATEGORIES= devel perl5 +MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=MooseX/} + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://search.cpan.org/dist/MooseX-Has-Options/ +COMMENT= Succinct options for Moose +LICENSE= ${PERL5_LICENSE} + +PKG_DESTDIR_SUPPORT= user-destdir + +USE_LANGUAGES= # empty +PERL5_PACKLIST= auto/MooseX/Has/Options/.packlist + +DEPENDS+= p5-Package-Stash>=0.18:../../devel/p5-Package-Stash + +BUILD_DEPENDS+= p5-Moose-[0-9]*:../../devel/p5-Moose +BUILD_DEPENDS+= p5-Test-Most-[0-9]*:../../devel/p5-Test-Most +BUILD_DEPENDS+= p5-namespace-autoclean-[0-9]*:../../devel/p5-namespace-autoclean + +.include "../../lang/perl5/module.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/devel/p5-MooseX-Has-Options/distinfo b/devel/p5-MooseX-Has-Options/distinfo new file mode 100644 index 00000000000..4e6a8a8925d --- /dev/null +++ b/devel/p5-MooseX-Has-Options/distinfo @@ -0,0 +1,5 @@ +$NetBSD: distinfo,v 1.1 2012/09/10 09:58:38 sno Exp $ + +SHA1 (MooseX-Has-Options-0.002.tar.gz) = f837cdf9d8b80a6fdd7eb4ca503347db6418597a +RMD160 (MooseX-Has-Options-0.002.tar.gz) = e6a7666bc7a537f86d382b8f90069ecc5acab68c +Size (MooseX-Has-Options-0.002.tar.gz) = 11586 bytes |