Which things can either have a name or be anonymous?

Scalar values
Arrays
Hashes
Rules
Subs
Classes?
Roles?
Modules?
Other things?

If anonymous roles exist, then does

    $object does role { method quux { ... } };

really add a method to an *instance*? I see no use for it now, but
imagine it can be useful.

And is there a way to name something that is anonymous? For example,
naming an anonymous subroutine can help when debugging. In Perl 5,
this is possible with Sub::Name.


Juerd

Reply via email to