From: Shawn M Moore Date: Sun, 9 Nov 2008 19:35:39 +0000 (+0000) Subject: Use method_metaclass; the other hardcoded classnames are easily overridden or fleeting X-Git-Tag: 0.05~79 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=31c69f8860adc76765eff7beeedbdcabfe1f405e;p=gitmo%2FMooseX-Role-Parameterized.git Use method_metaclass; the other hardcoded classnames are easily overridden or fleeting --- diff --git a/TODO b/TODO index 0419432..2ef02d9 100644 --- a/TODO +++ b/TODO @@ -36,4 +36,3 @@ + Parameters is an empty superclass. Is there anything interesting we can stick in there? -+ Factor out all class names used in methods; use existing class-name methods diff --git a/lib/MooseX/Role/Parameterized.pm b/lib/MooseX/Role/Parameterized.pm index c6a84e7..80ba9c5 100644 --- a/lib/MooseX/Role/Parameterized.pm +++ b/lib/MooseX/Role/Parameterized.pm @@ -70,7 +70,7 @@ sub method { my $name = shift; my $body = shift; - my $method = Moose::Meta::Method->wrap( + my $method = $CURRENT_METACLASS->method_metaclass->wrap( package_name => $caller, name => $name, body => $body,