Inline all Counter methods
[gitmo/Moose.git] / lib / Moose / Meta / Attribute / Native / Trait / Counter.pm
index 6c1481f..c1912c0 100644 (file)
@@ -6,20 +6,19 @@ our $VERSION   = '1.14';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
-use Moose::Meta::Attribute::Native::MethodProvider::Counter;
+use Moose::Meta::Method::Accessor::Native::Counter::dec;
+use Moose::Meta::Method::Accessor::Native::Counter::inc;
+use Moose::Meta::Method::Accessor::Native::Counter::reset;
+use Moose::Meta::Method::Accessor::Native::Counter::set;
 
-with 'Moose::Meta::Attribute::Native::Trait';
-
-has 'method_provider' => (
-    is        => 'ro',
-    isa       => 'ClassName',
-    predicate => 'has_method_provider',
-    default   => 'Moose::Meta::Attribute::Native::MethodProvider::Counter',
-);
+with 'Moose::Meta::Attribute::Native::Trait' =>
+    { -excludes => ['_root_types'] };
 
 sub _default_default { 0 }
 sub _default_is { 'ro' }
 sub _helper_type { 'Num' }
+sub _native_type { 'Counter' }
+sub _root_types { 'Num', 'Int' }
 
 no Moose::Role;