Mouse::Role.3pm

Langue: en

Version: 2010-05-08 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

Mouse::Role - The Mouse Role

VERSION

This document describes Mouse version 0.58

SYNOPSIS

     package MyRole;
     use Mouse::Role;
 
 

KEYWORDS

meta -> Mouse::Meta::Role

Returns this role's metaclass instance.

before (method|methods|regexp) -> CodeRef

Sets up a before method modifier. See ``before'' in Moose.

after (method|methods|regexp) => CodeRef

Sets up an after method modifier. See ``after'' in Moose.

around (method|methods|regexp) => CodeRef

Sets up an around method modifier. See ``around'' in Moose.

super

Sets up the super keyword. See ``super'' in Moose.

override method => CodeRef

Sets up an override method modifier. See ``Role/override'' in Moose.

inner

This is not supported in roles and emits an error. See ``Role'' in Moose.

augment method => CodeRef

This is not supported in roles and emits an error. See ``Role'' in Moose.

has (name|names) => parameters

Sets up an attribute (or if passed an arrayref of names, multiple attributes) to this role. See ``has'' in Mouse.

confess(error) -> BOOM

``confess'' in Carp for your convenience.

blessed(value) -> ClassName | undef

``blessed'' in Scalar::Util for your convenience.

MISC

import

Importing Mouse::Role will give you sugar.

unimport

Please unimport ("no Mouse::Role") so that if someone calls one of the keywords (such as ``has'') it will break loudly instead breaking subtly.

SEE ALSO

Moose::Role