From: Florian Ragwitz Date: Fri, 10 Apr 2009 17:37:18 +0000 (+0200) Subject: Remove the & prototype hack now Moose::Exporter doesn't throw prototypes away anymore. X-Git-Tag: 0.05~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Role-Parameterized.git;a=commitdiff_plain;h=e8e8ef3962deb8bb973b953ac66aac1895ea85aa Remove the & prototype hack now Moose::Exporter doesn't throw prototypes away anymore. --- diff --git a/dist.ini b/dist.ini index 73c0132..038ed76 100644 --- a/dist.ini +++ b/dist.ini @@ -7,6 +7,6 @@ copyright_holder = Infinity Interactive [@Classic] [Prereq] -Moose = 0.64 +Moose = 0.73 Test::Exception = 0.27 diff --git a/lib/MooseX/Role/Parameterized.pm b/lib/MooseX/Role/Parameterized.pm index 52f7d05..ed28f9f 100644 --- a/lib/MooseX/Role/Parameterized.pm +++ b/lib/MooseX/Role/Parameterized.pm @@ -35,7 +35,7 @@ sub parameter { } } -sub role { +sub role (&) { my $caller = shift; my $role_generator = shift; Class::MOP::Class->initialize($caller)->role_generator($role_generator); @@ -49,18 +49,6 @@ sub init_meta { ); } -# give role a (&) prototype -moose_around _make_wrapper => sub { - my $orig = shift; - my ($self, $caller, $sub, $fq_name) = @_; - - if ($fq_name =~ /::role$/) { - return sub (&) { $sub->($caller, @_) }; - } - - return $orig->(@_); -}; - sub has { my $caller = shift; my $meta = $CURRENT_METACLASS || Class::MOP::Class->initialize($caller);