Beginning of dzilization
[gitmo/Moose.git] / lib / Moose / Meta / Attribute / Native / Trait.pm
index 1eb2fc7..bb9f5f5 100644 (file)
@@ -6,8 +6,6 @@ use List::MoreUtils qw( any uniq );
 use Moose::Util::TypeConstraints;
 use Moose::Deprecated;
 
-our $VERSION   = '1.15';
-$VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
 requires '_helper_type';
@@ -44,7 +42,8 @@ before '_process_options' => sub {
         Moose::Deprecated::deprecated(
             feature => 'default default for Native Trait',
             message =>
-                'Allowing a native trait to automatically supply a default is deprecated'
+                'Allowing a native trait to automatically supply a default is deprecated.'
+                . ' You can avoid this warning by supplying a default, builder, or making the attribute required'
         );
     }
 };
@@ -168,6 +167,7 @@ sub _native_accessor_class_for {
         . $self->_native_type . '::'
         . $suffix;
 
+    Class::MOP::load_class($role);
     return Moose::Meta::Class->create_anon_class(
         superclasses =>
             [ $self->accessor_metaclass, $self->delegation_metaclass ],
@@ -198,11 +198,9 @@ no Moose::Util::TypeConstraints;
 
 1;
 
-__END__
-
-=head1 NAME
+# ABSTRACT: Shared role for native delegation traits
 
-Moose::Meta::Attribute::Native::Trait - Shared role for native delegation traits
+__END__
 
 =head1 BUGS
 
@@ -213,21 +211,4 @@ See L<Moose/BUGS> for details on reporting bugs.
 Documentation for Moose native traits can be found in
 L<Moose::Meta::Attribute::Native>.
 
-=head1 AUTHORS
-
-Yuval Kogman
-
-Shawn M Moore
-
-Jesse Luehrs
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 2007-2009 by Infinity Interactive, Inc.
-
-L<http://www.iinteractive.com>
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
 =cut