Commits

Toby Inkster committed 826d5a9 Draft

pass tests; bump version

  • Participants
  • Parent commits 3ec03f8

Comments (0)

Files changed (2)

lib/MooseX/RoleQR.pm

 package MooseX::RoleQR;
 
-use 5.010;
+use 5.008;
 use strict;
 use warnings;
 use utf8;
 
 BEGIN {
 	$MooseX::RoleQR::AUTHORITY = 'cpan:TOBYINK';
-	$MooseX::RoleQR::VERSION   = '0.001';
+	$MooseX::RoleQR::VERSION   = '0.002';
 }
 
 use Moose ();
 	my $type = shift;
 	my $meta = shift;
 
-	if (does($_[0], REGEXP))
+	if (does($_[0], REGEXP) or does($_[0], CODE))
 	{
 		my $pusher = "add_deferred_${type}_method_modifier";
 		return $meta->$pusher(@_);
 	use Moose;
 	use Scalar::Does -constants;
 	use namespace::sweep;
-	
+
+	BEGIN {
+		no warnings;
+		our $AUTHORITY = 'cpan:TOBYINK';
+		our $VERSION   = '0.002';
+	};
+
 	has [qw/ expression body /] => (is => 'ro', required => 1);
 	
 #	sub matches_name
 	use Carp;
 	use namespace::sweep;
 	
+	BEGIN {
+		no warnings;
+		our $AUTHORITY = 'cpan:TOBYINK';
+		our $VERSION   = '0.002';
+	};
+
 	has deferred_modifier_class => (
 		is      => 'ro',
 		isa     => 'ClassName',
 	use Moose::Role;
 	use namespace::sweep;
 	
+	BEGIN {
+		no warnings;
+		our $AUTHORITY = 'cpan:TOBYINK';
+		our $VERSION   = '0.002';
+	};
+
 	after apply => sub {
 		my ($meta, $class) = @_;
 		if ($class->isa('Moose::Meta::Class'))
 		else
 		{
 			push @{$ARGH{$class->name}}, map { $_->name } @{ $meta->get_roles };
-			Moose::Util::MetaRole::apply_metaroles(
-				for            => $class->name,
-				role_metaroles => \%ROLE_METAROLES,
-			);
-			bless(
-				$class,
-				Moose::Util::with_traits(
-					ref($class),
-					'MooseX::RoleQR::Trait::Role',
-				),
-			);
+### Commenting the stuff below out helped pass t/03classattribute.t.
+### Not completely sure why. :-(
+###
+#			Moose::Util::MetaRole::apply_metaroles(
+#				for            => $class->name,
+#				role_metaroles => \%ROLE_METAROLES,
+#			);
+#			bless(
+#				$class,
+#				Moose::Util::with_traits(
+#					ref($class),
+#					'MooseX::RoleQR::Trait::Role',
+#				),
+#			);
 		}
 	};
 };
 	use Moose::Role;
 	use namespace::sweep;
 
+	BEGIN {
+		no warnings;
+		our $AUTHORITY = 'cpan:TOBYINK';
+		our $VERSION   = '0.002';
+	};
+
 	before apply => sub {
 		my ($self, $role, $class) = @_;
 	};
 	use Moose::Role;
 	use namespace::sweep;
 
+	BEGIN {
+		no warnings;
+		our $AUTHORITY = 'cpan:TOBYINK';
+		our $VERSION   = '0.002';
+	};
+
 	before apply => sub {
 		my ($self, $role1, $role2) = @_;
 		push @{$ARGH{$role2->name}}, $role1->name;

meta/changes.pret

 # This file acts as the project's changelog.
 
 `MooseX-RoleQR 0.001 cpan:TOBYINK`
-	issued  2012-10-17;
+	issued  2012-10-18;
 	label   "Initial release".
 
+`MooseX-RoleQR 0.002 cpan:TOBYINK`
+	issued  2012-10-18;
+	changeset [
+		item "Play nicely with other composite role metaclass traits."^^Bugfix;
+		item "Add missing dep on thanks.pm."^^Packaging;
+		item "Bundle an 'examples' dir."^^Packaging;
+	].
+