From 31baf7b70e2f7c63476685afe18fc7c4697274d4 Mon Sep 17 00:00:00 2001 From: franck cuny Date: Wed, 2 Jun 2010 11:35:13 +0200 Subject: meta class with role --- lib/MooseX/Net/API/Meta/Class.pm | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'lib/MooseX/Net') diff --git a/lib/MooseX/Net/API/Meta/Class.pm b/lib/MooseX/Net/API/Meta/Class.pm index e4bed0c..376578d 100644 --- a/lib/MooseX/Net/API/Meta/Class.pm +++ b/lib/MooseX/Net/API/Meta/Class.pm @@ -1,25 +1,10 @@ package MooseX::Net::API::Meta::Class; use Moose::Role; -use Moose::Meta::Class; -use MooseX::Types::Moose qw(Str ArrayRef ClassName Object); -has local_api_methods => ( - traits => ['Array'], - is => 'ro', - isa => ArrayRef [Str], - required => 1, - default => sub { [] }, - auto_deref => 1, - handles => { '_add_api_method' => 'push' }, -); - -sub _build_meta_class { - my $self = shift; - return Moose::Meta::Class->create_anon_class( - superclasses => [ $self->method_metaclass ], - cache => 1, - ); -} +with qw/ + MooseX::Net::API::Meta::Method::APIMethod + MooseX::Net::API::Meta::Method::APIDeclare + /; 1; -- cgit 1.4.1