X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse.pm;h=22d8b2dceeb0e276227e34ed3adbf35e707bc59d;hb=1bfebf5f59ec3d3b5624f3d3a186506150f08ed2;hp=329ed83be6bd34422572495fee4b84779e981afc;hpb=8517d2ffa37a1201d9bf388d60b23a5daea27272;p=gitmo%2FMouse.git diff --git a/lib/Mouse.pm b/lib/Mouse.pm index 329ed83..22d8b2d 100644 --- a/lib/Mouse.pm +++ b/lib/Mouse.pm @@ -3,7 +3,7 @@ package Mouse; use strict; use warnings; -our $VERSION = '0.02'; +our $VERSION = '0.04'; use 5.006; use Sub::Exporter; @@ -39,7 +39,12 @@ do { $names = [$names] if !ref($names); for my $name (@$names) { - Mouse::Meta::Attribute->create($package, $name, @_); + if ($name =~ s/^\+//) { + Mouse::Meta::Attribute->clone_parent($package, $name, @_); + } + else { + Mouse::Meta::Attribute->create($package, $name, @_); + } } }; }, @@ -150,10 +155,6 @@ __END__ Mouse - Moose minus the antlers -=head1 VERSION - -Version 0.02 released 11 Jun 08 - =head1 SYNOPSIS package Point; @@ -208,10 +209,6 @@ Mouse also has the blessings of Moose's author, stevan. =head2 MISSING FEATURES -=head3 Method modifiers - -Fixing this one next, with a reimplementation of L. - =head3 Roles Fixing this one slightly less soon. stevan has suggested an implementation @@ -246,6 +243,21 @@ Returns this class' metaclass instance. Sets this class' superclasses. +=head2 before (method|methods) => Code + +Installs a "before" method modifier. See L or +L. + +=head2 after (method|methods) => Code + +Installs an "after" method modifier. See L or +L. + +=head2 around (method|methods) => Code + +Installs an "around" method modifier. See L or +L. + =head2 has (name|names) => parameters Adds an attribute (or if passed an arrayref of names, multiple attributes) to