Jonathan Rockway wrote:
> * On Wed, Apr 08 2009, Michael G Schwern wrote:
>> # Moose
>> sub DOES {
>> return $_[0]->meta->does_role($_[1]);
>> }
>>
>> # Class::Trait
>> sub DOES {
>> return $_[0]->does($_[1]);
>> }
>
> Why is the Perl 5.10 way ALL CAPS, anyway? DOES is not automatically
>
* On Wed, Apr 08 2009, Michael G Schwern wrote:
> # Moose
> sub DOES {
> return $_[0]->meta->does_role($_[1]);
> }
>
> # Class::Trait
> sub DOES {
> return $_[0]->does($_[1]);
> }
Why is the Perl 5.10 way ALL CAPS, anyway? DOES is not automatically
called by Perl, is it? (Follow-up quest
On Wed, Apr 08, 2009 at 08:59:12AM -0700, Michael G Schwern wrote:
> Ovid wrote:
> > We have an internal Test::Most I've hacked to support this and it
> > works for us because we only use Moose for roles, but I'd like to
> > hear other ideas.
> Get Moose and Class::Trait to fall in line with the 5.
Ovid wrote:
> Moose:
>
> if ( $object->meta->does_role($some_role) ) { ... }
>
> Class::Trait:
>
> if ( $object->does($some_role) ) { ... }
>
> 5.10 ad hoc support?
>
> if ( $object->DOES($some_role) ) { ... }
>
> We have an internal Test::Most I've hacked to support this and it works f
Oh, this is annoying. I have some tests failing because:
isa_ok $object, 'PIPs::ResultSet::Base::Group';
Should be:
does_ok $object, 'PIPs::ResultSet::Role::DoesGrouping';
Except does_ok() doesn't exist. However, roles are so important that it
*should* exist.
How?
Moose:
if ( $obje