---
name: "UR::Role::Instance"
section: "3pm"
platform: "linux"
package: "libur-perl"
version: "0.470+ds-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/UR::Role::Instance"
---

# UR::Role::Instance(3pm)

Represents a role composed with a class with a set of params

## NAME

UR::Role::Instance - Represents a role composed with a class with a set of params

## DESCRIPTION

When a class composes one or more roles, the role names given in the class description are converted to UR::Role::Instance objects as the class is constructed.  These are returned by the class' `roles()` method.

### Methods

- **role\_name()**

  Returns the name of the role

- **class\_name()**

  Returns the name of the class composing the role

- **role\_params()**

  Returns a hashref of role params used when the class composed the role

## SEE ALSO

UR::Role, UR::Role::Prototype
