NAME
MooseX::Declare - Declarative syntax for Moose
SYNOPSIS
use MooseX::Declare;
class BankAccount {
has 'balance' => ( isa => 'Num', is => 'rw', default => 0 );
method deposit (Num $amount) {
$self->balance( $self->balance + $amount );
}
method withdraw (Num $amount) {
my $current_balance = $s
more»
0.06 Tue, 24 Feb 2009 07:20:03 +0100
* Automatically import strict and warnings.
* Don't use the Moose sugar sugar methods for installing modifiers.
* Don't use the Moose sugar functions for applying roles.
* Use Test::NoWarnings instead of Test::Warn.
* Declare test dependency on Test::NoWarnings.
0.05 Mon, 23 Feb 2009 08:33:16 +0100
* Depend on the latest MooseX::Method::Signature
more»
* Implement class Foo;
* Only set up the matching declarators inside of class and role.
(i.e. no augment in role)
* Implemet subclass { ... }, meaning class Foo extends OuterClass { ... } for
nested classes.
* Allow $class = extends Foo { ... }; and $class = with Role { ... }; for
creating anonymous classes. Not only $class = class extends Foo { .. };
doesn't read very well, it's also hard
more»