develooper Front page | perl.moose | Postings from December 2010

RFC: MooseX::Dependency

Thread Next
From:
Moritz Onken
Date:
December 26, 2010 04:58
Subject:
RFC: MooseX::Dependency
Message ID:
35B1710F-1E0C-40B2-A3D3-F35E8F24293E@netcubed.de
Hi,

I want to publish one of my modules on cpan and wanted to get your blessings first.
What it does from the pod:

Moose type constraints restrict based on the value of the attribute. Using this module, attributes can have more complex constraints, which involve values of other attributes. It comes with a few constraints and can easily be extended.

 package Address;
 use MooseX::Dependency;

 has street => ( is => 'rw', dependency => All['city', 'zip'] );
 has city => ( is => 'ro' );
 has zip => ( is => 'ro', clearer => 'clear_zip' );

Find the complete pod and source at https://github.com/monken/p5-moosex-dependency

Cheers,

mo
Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About