MooseX::Declare::Syntax::Keyword::With.3pm

Langue: en

Autres versions - même langue

Version: 2009-09-04 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

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

SYNOPSIS

   use MooseX::Declare;
 
   class ::Baz {
       with 'Qux';
       ...
   }
 
 

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 defering 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 currenc "namespace".

CONSUMES

*
MooseX::Declare::Syntax::KeywordHandling

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.

SEE ALSO

*
MooseX::Declare
*
MooseX::Declare::Syntax::Keyword::Namespace
See MooseX::Declare