L<Class::Method::Modifiers::Fast> or L<Class::Method::Modifiers> is required
if you want support for L</before>, L</after>, and L</around>.
-=head2 MOOSE COMPAT
+=head2 MOOSE COMPATIBILITY
Compatibility with Moose has been the utmost concern. Fewer than 1% of the
tests fail when run against Moose instead of Mouse. Mouse code coverage is also
=head1 KEYWORDS
-=head2 meta -> Mouse::Meta::Class
+=head2 C<< $object->meta -> Mouse::Meta::Class >>
Returns this class' metaclass instance.
-=head2 extends superclasses
+=head2 C<< extends superclasses >>
Sets this class' superclasses.
-=head2 before (method|methods) => Code
+=head2 C<< before (method|methods) => CodeRef >>
Installs a "before" method modifier. See L<Moose/before> or
L<Class::Method::Modifiers/before>.
Use of this feature requires L<Class::Method::Modifiers>!
-=head2 after (method|methods) => Code
+=head2 C<< after (method|methods) => CodeRef >>
Installs an "after" method modifier. See L<Moose/after> or
L<Class::Method::Modifiers/after>.
Use of this feature requires L<Class::Method::Modifiers>!
-=head2 around (method|methods) => Code
+=head2 C<< around (method|methods) => CodeRef >>
Installs an "around" method modifier. See L<Moose/around> or
L<Class::Method::Modifiers/around>.
Use of this feature requires L<Class::Method::Modifiers>!
-=head2 has (name|names) => parameters
+=head2 C<< has (name|names) => parameters >>
Adds an attribute (or if passed an arrayref of names, multiple attributes) to
this class. Options:
=over 4
-=item is => ro|rw
+=item C<< is => ro|rw|bare >>
If specified, inlines a read-only/read-write accessor with the same name as
the attribute.
-=item isa => TypeConstraint
+=item C<< isa => TypeConstraint >>
Provides type checking in the constructor and accessor. The following types are
-supported. Any unknown type is taken to be a class check (e.g. isa =>
-'DateTime' would accept only L<DateTime> objects).
+supported. Any unknown type is taken to be a class check
+(e.g. C<< isa => 'DateTime' >> would accept only L<DateTime> objects).
Any Item Bool Undef Defined Value Num Int Str ClassName
Ref ScalarRef ArrayRef HashRef CodeRef RegexpRef GlobRef
For more documentation on type constraints, see L<Mouse::Util::TypeConstraints>.
-=item required => 0|1
+=item C<< required => Bool >>
Whether this attribute is required to have a value. If the attribute is lazy or
has a builder, then providing a value for the attribute in the constructor is
optional.
-=item init_arg => Str | Undef
+=item C<< init_arg => Str | Undef >>
Allows you to use a different key name in the constructor. If undef, the
-attribue can't be passed to the constructor.
+attribute can't be passed to the constructor.
-=item default => Value | CodeRef
+=item C<< default => Value | CodeRef >>
Sets the default value of the attribute. If the default is a coderef, it will
be invoked to get the default value. Due to quirks of Perl, any bare reference
is forbidden, you must wrap the reference in a coderef. Otherwise, all
instances will share the same reference.
-=item lazy => 0|1
+=item C<< lazy => Bool >>
If specified, the default is calculated on demand instead of in the
constructor.
-=item predicate => Str
+=item C<< predicate => Str >>
Lets you specify a method name for installing a predicate method, which checks
that the attribute has a value. It will not invoke a lazy default or builder
method.
-=item clearer => Str
+=item C<< clearer => Str >>
Lets you specify a method name for installing a clearer method, which clears
the attribute's value from the instance. On the next read, lazy or builder will
be invoked.
-=item handles => HashRef|ArrayRef
+=item C<< handles => HashRef|ArrayRef >>
Lets you specify methods to delegate to the attribute. ArrayRef forwards the
given method names to method calls on the attribute. HashRef maps local method
names to remote method names called on the attribute. Other forms of
L</handles>, such as regular expression and coderef, are not yet supported.
-=item weak_ref => 0|1
+=item C<< weak_ref => Bool >>
Lets you automatically weaken any reference stored in the attribute.
Use of this feature requires L<Scalar::Util>!
-=item trigger => CodeRef
+=item C<< trigger => CodeRef >>
Any time the attribute's value is set (either through the accessor or the constructor), the trigger is called on it. The trigger receives as arguments the instance, the new value, and the attribute instance.
-Mouse 0.05 supported more complex triggers, but this behavior is now removed.
-
-=item builder => Str
+=item C<< builder => Str >>
Defines a method name to be called to provide the default value of the
attribute. C<< builder => 'build_foo' >> is mostly equivalent to
C<< default => sub { $_[0]->build_foo } >>.
-=item auto_deref => 0|1
+=item C<< auto_deref => Bool >>
Allows you to automatically dereference ArrayRef and HashRef attributes in list
context. In scalar context, the reference is returned (NOT the list length or
bucket status). You must specify an appropriate type constraint to use
auto_deref.
-=item lazy_build => 0|1
+=item C<< lazy_build => Bool >>
+
+Automatically define the following options:
-Automatically define lazy => 1 as well as builder => "_build_$attr", clearer =>
-"clear_$attr', predicate => 'has_$attr' unless they are already defined.
+ has $attr => (
+ # ...
+ lazy => 1
+ builder => "_build_$attr",
+ clearer => "clear_$attr",
+ predicate => "has_$attr",
+ );
=back
-=head2 confess error -> BOOM
+=head2 C<< confess(message) -> BOOM >>
L<Carp/confess> for your convenience.
-=head2 blessed value -> ClassName | undef
+=head2 C<< blessed(value) -> ClassName | undef >>
L<Scalar::Util/blessed> for your convenience.
Please unimport Mouse (C<no Mouse>) so that if someone calls one of the
keywords (such as L</extends>) it will break loudly instead breaking subtly.
-=head1 FUNCTIONS
+=head1 SOURCE CODE ACCESS
-=head2 load_class Class::Name
+We have a public git repository:
-This will load a given C<Class::Name> (or die if it's not loadable).
-This function can be used in place of tricks like
-C<eval "use $module"> or using C<require>.
+ git clone git://jules.scsys.co.uk/gitmo/Mouse.git
-=head2 is_class_loaded Class::Name -> Bool
+=head1 DEPENDENCIES
-Returns whether this class is actually loaded or not. It uses a heuristic which
-involves checking for the existence of C<$VERSION>, C<@ISA>, and any
-locally-defined method.
+Perl 5.6.2 or later.
-=head1 SOURCE CODE ACCESS
+=head1 SEE ALSO
-We have a public git repo:
+L<Moose>
- git clone git://jules.scsys.co.uk/gitmo/Mouse.git
+L<Class::MOP>
=head1 AUTHORS
=head1 BUGS
-There is a known issue with Mouse on 5.6.2 regarding the @ISA tests. Until
-this is resolve the minimum version of Perl for Mouse is set to 5.8.0. Patches
-to resolve these tests are more than welcome.
-
-Please report any bugs through RT: email
-C<bug-mouse at rt.cpan.org>, or browse
-L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Mouse>.
+All complex software has bugs lurking in it, and this module is no exception.
+Please report any bugs to C<bug-mouse at rt.cpan.org>, or through the web
+interface at L<http://rt.cpan.org/Public/Dist/Display.html?Name=Mouse>
=head1 COPYRIGHT AND LICENSE
=head1 METHODS
-=head2 new %args -> Mouse::Meta::Attribute
+=head2 C<< new(%options) -> Mouse::Meta::Attribute >>
Instantiates a new Mouse::Meta::Attribute. Does nothing else.
-=head2 create OwnerClass, AttributeName, %args -> Mouse::Meta::Attribute
+It adds the following options to the constructor:
-Creates a new attribute in OwnerClass. Accessors and helper methods are
-installed. Some error checking is done.
+=over 4
-=head2 name -> AttributeName
+=item * C<< is => 'ro', 'rw', 'bare' >>
-=head2 associated_class -> OwnerClass
+This provides a shorthand for specifying the C<reader>, C<writer>, or
+C<accessor> names. If the attribute is read-only ('ro') then it will
+have a C<reader> method with the same attribute as the name.
-=head2 is_required -> Bool
+If it is read-write ('rw') then it will have an C<accessor> method
+with the same name. If you provide an explicit C<writer> for a
+read-write attribute, then you will have a C<reader> with the same
+name as the attribute, and a C<writer> with the name you provided.
-=head2 default -> Item
+Use 'bare' when you are deliberately not installing any methods
+(accessor, reader, etc.) associated with this attribute; otherwise,
+Moose will issue a deprecation warning when this attribute is added to a
+metaclass.
-=head2 has_default -> Bool
+=item * C<< isa => Type >>
-=head2 is_lazy -> Bool
+This option accepts a type. The type can be a string, which should be
+a type name. If the type name is unknown, it is assumed to be a class
+name.
-=head2 predicate -> MethodName | Undef
+This option can also accept a L<Moose::Meta::TypeConstraint> object.
-=head2 has_predicate -> Bool
+If you I<also> provide a C<does> option, then your C<isa> option must
+be a class name, and that class must do the role specified with
+C<does>.
-=head2 clearer -> MethodName | Undef
+=item * C<< does => Role >>
-=head2 has_clearer -> Bool
+This is short-hand for saying that the attribute's type must be an
+object which does the named role.
-=head2 handles -> { LocalName => RemoteName }
+B<This option is not yet supported.>
-=head2 has_handles -> Bool
+=item * C<< coerce => Bool >>
-=head2 is_weak_ref -> Bool
+This option is only valid for objects with a type constraint
+(C<isa>). If this is true, then coercions will be applied whenever
+this attribute is set.
-=head2 init_arg -> Str
+You can make both this and the C<weak_ref> option true.
-=head2 type_constraint -> Str
+=item * C<< trigger => CodeRef >>
-=head2 has_type_constraint -> Bool
+This option accepts a subroutine reference, which will be called after
+the attribute is set.
-=head2 trigger => CODE | Undef
+=item * C<< required => Bool >>
-=head2 has_trigger -> Bool
+An attribute which is required must be provided to the constructor. An
+attribute which is required can also have a C<default> or C<builder>,
+which will satisfy its required-ness.
-=head2 builder => MethodName | Undef
+A required attribute must have a C<default>, C<builder> or a
+non-C<undef> C<init_arg>
-=head2 has_builder -> Bool
+=item * C<< lazy => Bool >>
-=head2 is_lazy_build => Bool
+A lazy attribute must have a C<default> or C<builder>. When an
+attribute is lazy, the default value will not be calculated until the
+attribute is read.
-=head2 should_auto_deref -> Bool
+=item * C<< weak_ref => Bool >>
-Informational methods.
+If this is true, the attribute's value will be stored as a weak
+reference.
-=head2 verify_against_type_constraint Item -> 1 | ERROR
+=item * C<< auto_deref => Bool >>
-Checks that the given value passes this attribute's type constraint. Returns 1
-on success, otherwise C<confess>es.
+If this is true, then the reader will dereference the value when it is
+called. The attribute must have a type constraint which defines the
+attribute as an array or hash reference.
+
+=item * C<< lazy_build => Bool >>
+
+Setting this to true makes the attribute lazy and provides a number of
+default methods.
-=head2 canonicalize_args Name, %args -> %args
+ has 'size' => (
+ is => 'ro',
+ lazy_build => 1,
+ );
-Canonicalizes some arguments to create. In particular, C<lazy_build> is
-canonicalized into C<lazy>, C<builder>, etc.
+is equivalent to this:
-=head2 validate_args Name, \%args -> 1 | ERROR
+ has 'size' => (
+ is => 'ro',
+ lazy => 1,
+ builder => '_build_size',
+ clearer => 'clear_size',
+ predicate => 'has_size',
+ );
-Checks that the arguments to create the attribute (ie those specified by
-C<has>) are valid.
+=back
+
+=head2 C<< verify_against_type_constraint(Item) -> TRUE | ERROR >>
+
+Checks that the given value passes this attribute's type constraint. Returns C<true>
+on success, otherwise C<confess>es.
-=head2 clone_parent OwnerClass, AttributeName, %args -> Mouse::Meta::Attribute
+=head2 C<< clone_and_inherit_options(options) -> Mouse::Meta::Attribute >>
Creates a new attribute in OwnerClass, inheriting options from parent classes.
Accessors and helper methods are installed. Some error checking is done.
-=head2 get_parent_args OwnerClass, AttributeName -> Hash
+=head1 SEE ALSO
-Returns the options that the parent class of C<OwnerClass> used for attribute
-C<AttributeName>.
+L<Moose::Meta::Attribute>
=cut
=head1 NAME
-Mouse::Meta::Class - hook into the Mouse MOP
+Mouse::Meta::Class - The Mouse class metaclass
=head1 METHODS
Clones the given C<Instance> which must be an instance governed by this
metaclass.
-=head1 BUGS
+=head1 SEE ALSO
-All complex software has bugs lurking in it, and this module is no
-exception. If you find a bug please either email me, or add the bug
-to cpan-RT.
+L<Moose::Meta::Class>
=cut
1;
__END__
+
+=head1 NAME
+
+Mouse::Meta::Method - A Mouse Method metaclass
+
+=head1 SEE ALSO
+
+L<Moose::Meta::Method>
+
+=cut
=head1 NAME
-Mouse::Meta::Module - Common base class for Mouse::Meta::Class and Mouse::Meta::Role
+Mouse::Meta::Module - The base class for Mouse::Meta::Class and Mouse::Meta::Role
=cut
1;
+__END__
+
+=head1 NAME
+
+Mouse::Meta::Role - The Mouse Role metaclass
+
+=head1 SEE ALSO
+
+L<Moose::Meta::Role>
+
+=cut
__END__
+=head1 NAME
+
+Mouse::Meta::Role::Method - A Mouse Method metaclass for Roles
+
+=head1 SEE ALSO
+
+L<Moose::Meta::Role::Method>
+
+=cut
+
=head1 NAME
-Mouse::Meta::TypeConstraint - The Mouse Type Constraint Metaclass
+Mouse::Meta::TypeConstraint - The Mouse Type Constraint metaclass
=head1 DESCRIPTION
=back
+=head1 SEE ALSO
+
+L<Moose::Meta::TypeConstraint>
+
=cut
=head1 METHODS
-=head2 new arguments -> object
+=head2 C<< new arguments -> Object >>
-Instantiates a new Mouse::Object. This is obviously intended for subclasses.
+Instantiates a new C<Mouse::Object>. This is obviously intended for subclasses.
-=head2 BUILDALL \%args
+=head2 C<< BUILDARGS(@args) -> HashRef >>
-Calls L</BUILD> on each class in the class hierarchy. This is called at the
-end of L</new>.
+Lets you override the arguments that C<new> takes. Return a hashref of
+parameters.
-=head2 BUILD \%args
+=head2 C<< BUILDALL \%args >>
-You may put any business logic initialization in BUILD methods. You don't
-need to redispatch or return any specific value.
+Calls C<BUILD> on each class in the class hierarchy. This is called at the
+end of C<new>.
-=head2 BUILDARGS
+=head2 C<< BUILD \%args >>
-Lets you override the arguments that C<new> takes. Return a hashref of
-parameters.
+You may put any business logic initialization in BUILD methods. You don't
+need to redispatch or return any specific value.
-=head2 DEMOLISHALL
+=head2 C<< DEMOLISHALL >>
-Calls L</DEMOLISH> on each class in the class hierarchy. This is called at
-L</DESTROY> time.
+Calls C<DEMOLISH> on each class in the class hierarchy. This is called at
+C<DESTROY> time.
-=head2 DEMOLISH
+=head2 C<< DEMOLISH >>
You may put any business logic deinitialization in DEMOLISH methods. You don't
need to redispatch or return any specific value.
-=head2 does $role_name
+=head2 C<< does ($role_name) -> Bool >>
-This will check if the invocant's class "does" a given C<$role_name>.
+This will check if the invocant's class B<does> a given C<$role_name>.
This is similar to "isa" for object, but it checks the roles instead.
-
-=head2 B<dump ($maxdepth)>
+=head2 C<<dump ($maxdepth) -> Str >>
From the Moose POD:
The implementation was lifted directly from Moose::Object.
-=cut
+=head1 SEE ALSO
+
+L<Moose::Object>
+=cut
=head1 NAME
-Mouse::Role - define a role in Mouse
+Mouse::Role - The Mouse Role
+
+=head1 SYNOPSIS
+
+ package MyRole;
+ use Mouse::Role;
=head1 KEYWORDS
-=head2 meta -> Mouse::Meta::Role
+=head2 C<< meta -> Mouse::Meta::Role >>
Returns this role's metaclass instance.
-=head2 before (method|methods) => Code
+=head2 C<< before (method|methods) -> CodeRef >>
-Sets up a "before" method modifier. See L<Moose/before> or
+Sets up a B<before> method modifier. See L<Moose/before> or
L<Class::Method::Modifiers/before>.
-=head2 after (method|methods) => Code
+=head2 C<< after (method|methods) => CodeRef >>
-Sets up an "after" method modifier. See L<Moose/after> or
+Sets up an B<after> method modifier. See L<Moose/after> or
L<Class::Method::Modifiers/after>.
-=head2 around (method|methods) => Code
+=head2 C<< around (method|methods) => CodeRef >>
-Sets up an "around" method modifier. See L<Moose/around> or
+Sets up an B<around> method modifier. See L<Moose/around> or
L<Class::Method::Modifiers/around>.
-=over 4
-
-=item B<super>
+=head2 C<super>
-Sets up the "super" keyword. See L<Moose/super>.
+Sets up the B<super> keyword. See L<Moose/super>.
-=item B<override ($name, &sub)>
+=head2 C<< override method => CodeRef >>
-Sets up an "override" method modifier. See L<Moose/Role/override>.
+Sets up an B<override> method modifier. See L<Moose/Role/override>.
-=item B<inner>
+=head2 C<inner>
-This is not supported and emits an error. See L<Moose/Role>.
+This is not supported in roles and emits an error. See L<Moose/Role>.
-=item B<augment ($name, &sub)>
+=head2 C<< augment method => CodeRef >>
-This is not supported and emits an error. See L<Moose/Role>.
+This is not supported in roles and emits an error. See L<Moose/Role>.
-=back
-
-=head2 has (name|names) => parameters
+=head2 C<< has (name|names) => parameters >>
Sets up an attribute (or if passed an arrayref of names, multiple attributes) to
this role. See L<Mouse/has>.
-=head2 confess error -> BOOM
+=head2 C<< confess(error) -> BOOM >>
L<Carp/confess> for your convenience.
-=head2 blessed value -> ClassName | undef
+=head2 C<< blessed(value) -> ClassName | undef >>
L<Scalar::Util/blessed> for your convenience.
=head2 unimport
-Please unimport Mouse (C<no Mouse::Role>) so that if someone calls one of the
+Please unimport (C<< no Mouse::Role >>) so that if someone calls one of the
keywords (such as L</has>) it will break loudly instead breaking subtly.
+=head1 SEE ALSO
+
+L<Moose::Role>
+
=cut
=head2 Class::MOP
-=head3 C<is_class_loaded>
+=head2 C<< is_class_loaded(ClassName) -> Bool >>
-=head3 C<load_class>
+Returns whether C<ClassName> is actually loaded or not. It uses a heuristic which
+involves checking for the existence of C<$VERSION>, C<@ISA>, and any
+locally-defined method.
+
+=head3 C<< load_class(ClassName) >>
+
+This will load a given C<ClassName> (or die if it's not loadable).
+This function can be used in place of tricks like
+C<eval "use $module"> or using C<require>.
=head2 MRO::Compat
=back
+=head1 SEE ALSO
+
+L<Moose::Util>
+
+L<Scalar::Util>
+
+L<Sub::Identify>
+
+L<MRO::Compat>
+
=cut
=over 4
-=item B<subtype 'Name' => as 'Parent' => where { } ...>
+=item C<< subtype 'Name' => as 'Parent' => where { } ... -> Mouse::Meta::TypeConstraint >>
-=item B<subtype as 'Parent' => where { } ...>
+=item C<< subtype as 'Parent' => where { } ... -> Mouse::Meta::TypeConstraint >>
-=item B<class_type ($class, ?$options)>
+=item C<< class_type ($class, ?$options) -> Mouse::Meta::TypeConstraint >>
-=item B<role_type ($role, ?$options)>
+=item C<< role_type ($role, ?$options) -> Mouse::Meta::TypeConstraint >>
-=item B<enum (\@values)>
+=item C<< enum (\@values) -> Mouse::Meta::TypeConstraint >>
+
+=back
+
+=over 4
+
+=item C<< find_type_constraint(Type) -> Mouse::Meta::TypeConstraint >>
=back
=head1 THANKS
-Much of this documentation was taken from L<Moose::Util::TypeConstraints>
+Much of this documentation was taken from C<Moose::Util::TypeConstraints>
+
+=head1 SEE ALSO
+
+L<Moose::Util::TypeConstraints>
=cut
=head1 NAME
-Squirrel - Use L<Mouse>, unless L<Moose> is already loaded.
+Squirrel - Use L<Mouse>, unless L<Moose> is already loaded. (DEPRECATED)
=head1 SYNOPSIS
=head1 DEPRECATION
-L<Squirrel> is deprecated. L<Any::Moose> provides the same functionality,
+C<Squirrel> is deprecated. C<Any::Moose> provides the same functionality,
but better. :)
=head1 DESCRIPTION
-L<Moose> and L<Squirrel> are TEH BEST FRENDS, but if L<Moose> isn't there
+L<Moose> and L<Squirrel> are THE BEST FRIENDS, but if L<Moose> isn't there
L<Squirrel> will hang out with L<Mouse> as well.
When your own code doesn't actually care whether or not you use L<Moose> or
L<Moose> is already in use you get all the benefits of using that
(transformability, introspection, more opportunities for code reuse, etc).
+=head1 SEE ALSO
+
+L<Any::Moose>
+
=cut
1;
+__END__
+
+=head1 NAME
+
+Squirrel::Role - Use Mouse::Role, unless MooseRole is already loaded. (DEPRECATED)
+
+=cut
+
=head1 DESCRIPTION
-ouse.pm is a simple source filter that adds C<package $name; use Mouse;>
+F<ouse.pm> is a simple source filter that adds C<package $name; use Mouse;>
to the beginning of your script and was entirely created because typing
-perl -e'package Foo; use Mouse; ...' was annoying me... especially after
+perl C<< -e'package Foo; use Mouse; ...' >> was annoying me... especially after
getting used to having C<-Moose> for Moose.
=head1 INTERFACE
-ouse provides exactly one method and it's automically called by perl:
+C<ouse> provides exactly one method and it is automatically called by perl:
=over 4
-=item B<import($package)>
+=item C<< oose->import() >>>
Pass a package name to import to be used by the source filter.
None reported. But it is a source filter and might have issues there.
-=head1 BUGS
+=head1 SEE ALSO
-All complex software has bugs lurking in it, and this module is no
-exception. If you find a bug please either email me, or add the bug
-to cpan-RT.
+L<oose> for C<< perl -Moose -e '...' >>
=head1 AUTHOR
+++ /dev/null
-use Test::More;
-eval "use Test::Pod 1.00";
-plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
-all_pod_files_ok();