On Fri, 2005-09-30 at 23:13 +0200, Torsten Schoenfeld wrote: > it looks like Test::More 0.61 broke Glib's test suite again, so I'm > beginning to wonder if we're doing something stupid. Hence the > question: How do you properly test an object's overloaded array > dereference operator @{}?
Does doing it in two steps work? Instead of: > is_deeply ($obj->get ('some_flags'), ['value-one', 'value-two']); perhaps: my @flags = @{ $obj->get( 'some_flags' ) }; is_deeply( [EMAIL PROTECTED], [ 'value-one', 'value-two' ] ); If you're paranoid, you could wrap the dereference in a lives_ok() call from Text::Exception. is() and is_deeply() have a little bit of magic that usually does the right thing. Overloading is magical enough already, so I try never to cross the streams. -- c