logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

MooseX::Declare::Syntax::Keyword::With - Apply roles within a class- or role-body

Author

       Florian Ragwitz <rafl@debian.org>

Consumes

       •   MooseX::Declare::Syntax::KeywordHandling

Description

       The "with" keyword allows you to apply roles to the local class or role. It differs from the
       "with"-option of the "class" and "role" keywords in that it applies the roles immediately instead of
       deferring application until the end of the class- or role-definition.

       It also differs slightly from the "with" provided by Moose in that it expands relative role names
       ("::Foo") according to the current "namespace".

Methods

parse
         Object->parse(Object $context)

       Will skip the declarator and make with "with" invocation apply the set of specified roles after possible
       "namespace"-expanding has been done.

Name

       MooseX::Declare::Syntax::Keyword::With - Apply roles within a class- or role-body

See Also

       •   MooseX::Declare

       •   MooseX::Declare::Syntax::Keyword::Namespace

Synopsis

         use MooseX::Declare;

         class ::Baz {
             with 'Qux';
             ...
         }

Version

       version 0.43

See Also