projects
/
gitmo/MooseX-Role-Parameterized.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
1adb2fe
)
Shouldn't this be enough? :)
Shawn M Moore [Sun, 9 Nov 2008 07:26:34 +0000 (07:26 +0000)]
lib/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm
b/lib/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm
index
a7cbe8d
..
584382a
100644
(file)
--- a/
lib/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm
+++ b/
lib/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm
@@
-57,6
+57,15
@@
sub generate_role {
return $role;
}
+sub apply {
+ my $self = shift;
+ my $class = shift;
+ my %args = @_;
+
+ my $role = $self->generate_role(%args);
+ $role->apply($class, %args);
+}
+
__PACKAGE__->meta->make_immutable;
no Moose;