-
package Moose::Role;
+use strict;
+use warnings;
use Scalar::Util 'blessed';
use Carp 'croak';
use Sub::Exporter;
-our $VERSION = '0.79';
+our $VERSION = '0.85';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
my $meta = Moose::Meta::Role->initialize(shift);
my $name = shift;
croak 'Usage: has \'name\' => ( key => value, ... )' if @_ == 1;
- my %options = @_;
+ my %options = ( definition_context => Moose::Util::_caller_info(), @_ );
my $attrs = ( ref($name) eq 'ARRAY' ) ? $name : [ ($name) ];
$meta->add_attribute( $_, %options ) for @$attrs;
}
=head1 DESCRIPTION
-Role support in Moose is pretty solid at this point. However, the best
-documentation is still the the test suite. It is fairly safe to assume Perl 6
-style behavior and then either refer to the test suite, or ask questions on
-#moose if something doesn't quite do what you expect.
-
-We are planning writing some more documentation in the near future, but nothing
-is ready yet, sorry.
+The concept of roles is documented in L<Moose::Manual::Role>. This document
+serves as API documentation.
=head1 EXPORTED FUNCTIONS