From: Shawn M Moore Date: Sun, 9 Nov 2008 03:02:46 +0000 (+0000) Subject: parameter keyword X-Git-Tag: 0.05~109 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=19af6e75ef72d5d629227e9c980a6b97a4590743;p=gitmo%2FMooseX-Role-Parameterized.git parameter keyword --- diff --git a/lib/MooseX/Role/Parameterized.pm b/lib/MooseX/Role/Parameterized.pm index 8c16ba8..2bc271f 100644 --- a/lib/MooseX/Role/Parameterized.pm +++ b/lib/MooseX/Role/Parameterized.pm @@ -7,7 +7,14 @@ use MooseX::Role::Parameterized::Meta::Role; use Moose::Role (); use Moose::Exporter; -Moose::Exporter->setup_import_methods; +Moose::Exporter->setup_import_methods( + with_caller => ['parameter'], +); + +sub parameter { + my $caller = shift; + $caller->meta->add_parameter(@_); +} sub init_meta { my $self = shift;