Skip to content
This repository was archived by the owner on Dec 7, 2022. It is now read-only.
This repository was archived by the owner on Dec 7, 2022. It is now read-only.

Implement init_arg for attributes #24

@schwern

Description

@schwern

init_arg is the expected key in an initialization hash.

For instance, if we have an "init_arg" value of "-foo", then the following code will Just Work.

MyClass->new( -foo => 'Hello There' );
  • init_arg defaults to the attribute name
  • If init_arg is explicitly set to undef the attribute cannot be specified during initialization.

See Class::MOP::Attribute for the original reference.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions