[libmoox-late-perl] 02/08: Moo has default => $nonref built in now. Yay

Intrigeri intrigeri at moszumanska.debian.org
Thu Aug 14 11:13:49 UTC 2014


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to tag 0.013
in repository libmoox-late-perl.

commit 4000c953cea9a70df68572698788239ba3c0dffd
Author: Toby Inkster <mail at tobyinkster.co.uk>
Date:   Fri Jun 28 12:56:08 2013 +0100

    Moo has default => $nonref built in now. Yay
---
 lib/MooX/late.pm | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/lib/MooX/late.pm b/lib/MooX/late.pm
index bb43db3..c38a5f6 100644
--- a/lib/MooX/late.pm
+++ b/lib/MooX/late.pm
@@ -89,8 +89,6 @@ sub import
 				my $spec = +{ %spec }; # shallow clone
 				$me->_process_isa($name, $spec, $context, $caller)
 					if exists $spec->{isa} && !ref $spec->{isa};
-				$me->_process_default($name, $spec, $context, $caller)
-					if exists $spec->{default} && !ref $spec->{default};
 				$me->_process_lazy_build($name, $spec, $context, $caller)
 					if exists $spec->{lazy_build} && $spec->{lazy_build};
 				
@@ -118,14 +116,6 @@ sub _process_isa
 	return;
 }
 
-sub _process_default
-{
-	my ($me, $name, $spec, $context) = @_;
-	my $value = $spec->{default};
-	$spec->{default} = sub { $value };
-	return;
-}
-
 sub _process_lazy_build
 {
 	my ($me, $name, $spec, $context) = @_;
@@ -201,6 +191,8 @@ This feature requires L<Types::Standard>.
 
 =item 2.
 
+B<< Retired feature: >> this is now built in to Moo.
+
 Allows C<< default => $non_reference_value >> to work when defining
 attributes.
 
@@ -214,7 +206,7 @@ Exports C<blessed> and C<confess> functions to your namespace.
 
 =back
 
-Four features. It is not the aim of C<MooX::late> to make every aspect of
+Three features. It is not the aim of C<MooX::late> to make every aspect of
 Moo behave exactly identically to Moose. It's just going after the low-hanging
 fruit. So it does four things right now, and I promise that future versions
 will never do more than seven.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmoox-late-perl.git



More information about the Pkg-perl-cvs-commits mailing list