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 ( $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 for us 
because we only use Moose for roles, but I'd like to hear other ideas.

 
Cheers,
Ovid
--
Buy the book         - http://www.oreilly.com/catalog/perlhks/
Tech blog            - http://use.perl.org/~Ovid/journal/
Twitter              - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Reply via email to