---
name: "UR::Role::PrototypeWithParams"
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::PrototypeWithParams"
---

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

Binds a set of params to a role

## NAME

UR::Role::PrototypeWithParams - Binds a set of params to a role

## DESCRIPTION

Objects of this class are returned when calling `create()` on a role's class. They exist temporarily as a class is being defined as a means of binding a set of role params to a UR::Role::Prototype to use in the `"roles"` section of a class description.  See the "Parameterized Roles" section in UR::Role.

### Methods

- create(prototype =\> $role\_proto, role\_params =\> $hashref)

  The constructor.  Both arguments are required.

- \_\_role\_\_()

  Returns itself.  Used by the role composition mechanism to trigger autoloading the role's module when role names are given as strings in a class definition.

- instantiate\_role\_instance($class\_name)

  Return a UR::Role::Instance object.

## SEE ALSO

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