Re: Test::More::does_ok()

2009-04-08 Thread Michael G Schwern
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 >

Re: Test::More::does_ok()

2009-04-08 Thread Jonathan Rockway
* 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

Re: Test::More::does_ok()

2009-04-08 Thread David Cantrell
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.

Re: Test::More::does_ok()

2009-04-08 Thread Michael G Schwern
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

Test::More::does_ok()

2009-04-08 Thread Ovid
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