Commits

Toby Inkster committed 608141e

pass new test

Comments (0)

Files changed (3)

-package MooX::late;
-
 use 5.008;
 use strict;
 use warnings;
+
+package MooX::late;
+our AUTHORITY = 'cpan:TOBYINK';
+our VERSION   = '0.005';
+
 use Moo              qw( );
 use Carp             qw( carp croak );
 use Scalar::Util     qw( blessed );
 use Module::Runtime  qw( is_module_name );
 
 BEGIN {
-	$MooX::late::AUTHORITY = 'cpan:TOBYINK';
-	$MooX::late::VERSION   = '0.004';
-};
-
-BEGIN {
 	package MooX::late::DefinitionContext;
+	our AUTHORITY = 'cpan:TOBYINK';
+	our VERSION   = '0.005';
+	
 	use Moo;
 	use overload (
 		q[""]    => 'to_string',
 	$install_tracked->(
 		$caller, has => sub
 		{
-			my ($name, %spec) = @_;
-			
+			my ($proto, %spec) = @_;
 			my $context = "MooX::late::DefinitionContext"->new_from_caller(0);
 			
-			$me->_process_isa($name, \%spec, $context)
-				if exists $spec{isa} && !ref $spec{isa};
-			
-			$me->_process_default($name, \%spec, $context)
-				if exists $spec{default} && !ref $spec{default};
-			
-			$me->_process_lazy_build($name, \%spec, $context)
-				if exists $spec{lazy_build} && $spec{lazy_build};
-			
-			return $orig->($name, %spec);
+			for my $name (ref $proto ? @$proto : $proto)
+			{
+				my $spec = +{ %spec }; # shallow clone
+				$me->_process_isa($name, $spec, $context)
+					if exists $spec->{isa} && !ref $spec->{isa};
+				$me->_process_default($name, $spec, $context)
+					if exists $spec->{default} && !ref $spec->{default};
+				$me->_process_lazy_build($name, $spec, $context)
+					if exists $spec->{lazy_build} && $spec->{lazy_build};
+				
+				$orig->($name, %$spec);
+			}
+			return;
 		},
 	);
 	

meta/changes.pret

 		item "Issue warnings when type constraint cannot be interpreted correctly. Warning is not issued at the time the attribute is built, but the first time the type constraint is checked against. Don't attempt to inflate these type constraints when Moose is loaded."^^Addition;
 	].
 
+`MooX-late 0.005 cpan:TOBYINK`
+	issued  2012-12-09;
+	changeset [
+		item "Bump required version of Moo to 1.000004."^^Packaging;
+		item "Cope with has \@attributes => (...)."^^Bugfix;
+	].
+

meta/makefile.pret

 	version_from      m`MooX::late`;
 	readme_from       m`MooX::late`;
 	test_requires     p`Test::More 0.61`;
-	requires          p`Moo 1.000000`;
+	requires          p`Moo 1.000004`;
 	recommends        p`MooX`;
 .