use 5.008;
use Scalar::Util 'blessed';
-use Carp 'confess';
+use Carp 'carp', 'confess';
use Class::Load 'is_class_loaded';
-
use Moose::Deprecated;
use Moose::Exporter;
Moose->throw_error('Usage: has \'name\' => ( key => value, ... )')
if @_ % 2 == 1;
- my %options = ( definition_context => Moose::Util::_caller_info(), @_ );
+ my %context = Moose::Util::_caller_info;
+ $context{context} = 'has declaration';
+ $context{type} = 'class';
+ my %options = ( definition_context => \%context, @_ );
my $attrs = ( ref($name) eq 'ARRAY' ) ? $name : [ ($name) ];
$meta->add_attribute( $_, %options ) for @$attrs;
}
our @SUPER_ARGS;
sub super {
+ if (@_) {
+ carp 'Arguments passed to super() are ignored';
+ }
+
# This check avoids a recursion loop - see
# t/bugs/super_recursion.t
return if defined $SUPER_PACKAGE && $SUPER_PACKAGE ne caller();
See L<Metaclass and Trait Name Resolution> for details on how a trait name is
resolved to a role name.
-Also see L<Moose::Cookbook::Meta::Recipe3> for a metaclass trait
-example.
+Also see L<Moose::Cookbook::Meta::Labeled_AttributeTrait> for a metaclass
+trait example.
=item I<builder> => Str
for a class matching B<Moose::Meta::$type::Custom::$metaclass_name>.
If all this is confusing, take a look at
-L<Moose::Cookbook::Meta::Recipe3>, which demonstrates how to create an
-attribute trait.
+L<Moose::Cookbook::Meta::Labeled_AttributeTrait>, which demonstrates how to
+create an attribute trait.
=head1 UNIMPORTING FUNCTIONS
To learn more about extending Moose, we recommend checking out the
"Extending" recipes in the L<Moose::Cookbook>, starting with
-L<Moose::Cookbook::Extending::Recipe1>, which provides an overview of
+L<Moose::Cookbook::Extending::ExtensionOverview>, which provides an overview of
all the different ways you might extend Moose. L<Moose::Exporter> and
L<Moose::Util::MetaRole> are the modules which provide the majority of the
extension functionality, so reading their documentation should also be helpful.
This channel is quite active, and questions at all levels (on Moose-related
topics ;) are welcome.
+=head1 WHAT DOES MOOSE STAND FOR?
+
+Moose doesn't stand for one thing in particular, however, if you want, here
+are a few of our favorites, feel free to contribute more.
+
+=over 4
+
+=item * Make Other Object Systems Envious
+
+=item * Makes Object Orientation So Easy
+
+=item * Makes Object Orientation Spiffy- Er (sorry ingy)
+
+=item * Most Other Object Systems Emasculate
+
+=item * Moose Often Ovulate Sorta Early
+
+=item * Moose Offers Often Super Extensions
+
+=item * Meta Object Obligates Salivary Excitation
+
+=item * Meta Object Orientation Syntax Extensions
+
+=back
+
=head1 ACKNOWLEDGEMENTS
=over 4