pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/p5-MooseX-Has-Options



Module Name:    pkgsrc
Committed By:   sno
Date:           Mon Sep 10 09:58:38 UTC 2012

Added Files:
        pkgsrc/devel/p5-MooseX-Has-Options: DESCR Makefile distinfo

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/p5-MooseX-Has-Options/DESCR \
    pkgsrc/devel/p5-MooseX-Has-Options/Makefile \
    pkgsrc/devel/p5-MooseX-Has-Options/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index