Convert Moose->throw_error to Moose::Util::throw
[gitmo/Moose.git] / lib / Moose / Meta / Attribute / Native.pm
index 524c48d..05ccf7a 100644 (file)
@@ -1,6 +1,6 @@
 package Moose::Meta::Attribute::Native;
 
-our $AUTHORITY = 'cpan:STEVAN';
+use Class::Load qw(load_class);
 
 my @trait_names = qw(Bool Counter Number String Array Hash Code);
 
@@ -11,7 +11,7 @@ for my $trait_name (@trait_names) {
     );
     if ($meta->find_method_by_name('register_implementation')) {
         my $class = $meta->name->register_implementation;
-        Moose->throw_error(
+        Moose::Util::throw(
             "An implementation for $trait_name already exists " .
             "(found '$class' when trying to register '$trait_class')"
         );
@@ -19,7 +19,7 @@ for my $trait_name (@trait_names) {
     $meta->add_method(register_implementation => sub {
         # resolve_metatrait_alias will load classes anyway, but throws away
         # their error message; we WANT to die if there's a problem
-        Class::MOP::load_class($trait_class);
+        load_class($trait_class);
         return $trait_class;
     });
 }
@@ -91,8 +91,6 @@ You will need to make sure that the attribute has an appropriate type. For
 example, to use this with a Hash you must specify that your attribute is some
 sort of C<HashRef>.
 
-If you I<don't> specify a type, each trait has a default type it will use.
-
 =head2 handles
 
 This is just like any other delegation, but only a hash reference is allowed
@@ -107,8 +105,8 @@ See the docs for each native trait for details on what methods are available.
 
 Some traits provide a default C<is> for historical reasons. This behavior is
 deprecated, and you are strongly encouraged to provide a value. If you don't
-plan to read and write the attribute value directly, you can set C<< is =>
-'bare' >> to prevent standard accessor generation.
+plan to read and write the attribute value directly, not passing the C<is>
+option will prevent standard accessor generation.
 
 =head2 default or builder