[Perl5-syntax] How to test for a role in a method signature
Michael G Schwern
schwern at pobox.com
Tue Mar 8 09:33:01 GMT 2011
On 2011.3.8 3:15 PM, Buddy Burden wrote:
>> [1] What are we calling these class/type/role things?
>
> Good question. In my head, I just call them "types" ... when you say
> "Foo::Bar $foo", the "Foo::Bar" part isn't _technically_ a class; it's
> actually a type that happens to correspond to a class. But I suppose
> that's really a semantic distinction (and/or an implementation
> detail).
We could call them types if types didn't already mean something specific in
Moose. "template" has C++ baggage we don't want to drag in. Hrm.
> We could refer to them as "constraints" I suppose ... type
> constraints, class constraints, and role constraints. <shrug>
Technically they are a constraint, but "where" is already called constraints,
and that lines up with vocabulary in other languages like SQL.
--
31. Not allowed to let sock puppets take responsibility for any of my
actions.
-- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
http://skippyslist.com/list/
More information about the Perl5-syntax
mailing list