On Sun, Dec 31, 2006 at 04:21:21PM +0000, Adrian Howard wrote: > Personally I find reading something like: > > lives_and { is $dt->answer, 42 } 'correct answer found'; > > a lot easier to read and maintain than something like: > > my $answer = eval { $dt->answer }; > if ( my $e = $@ ) { > fail "correct answer found"; > diag "died unexpectedly ($e)"; > } else { > is $answer, 42, 'correct answer found'; > }
Oh yes, I shall agree with that. It was more a matter of trading off that advantage against the cost of an extra dependency. > T::E is also a > moderately popular module so you will find it already installed in > lots of places. Well, that's the thing. I had to install it on the test boxes I'm currently developing the code on - I didn't want to upload it to PAUSE then find that all the automatic test boxes all fail it because of a missing Test:: module. That said, I know Test::More isn't core, yet all my tests use that without declaring it, so maybe it would work. I guess the core problem here is really a lack of build-time dependency tracking in EU::MM; which I have suggested here: http://rt.cpan.org//Ticket/Display.html?id=24159 Maybe I might even get around to fixing it... -- Paul "LeoNerd" Evans [EMAIL PROTECTED] ICQ# 4135350 | Registered Linux# 179460 http://www.leonerd.org.uk/
signature.asc
Description: Digital signature