develooper Front page | perl.qa | Postings from January 2007

Re: Bad test functions in Test::Exception

Thread Previous | Thread Next
From:
Adrian Howard
Date:
January 31, 2007 00:58
Subject:
Re: Bad test functions in Test::Exception
Message ID:
63F475DA-3193-4413-9588-61C7E3905233@quietstars.com

On 30 Jan 2007, at 18:19, A. Pagaltzis wrote:

> That could easily be accomodated by having `throws_ok` accept a
> sub ref as its condition argument. Then Test::Exception could
> pass the value of $@ to this sub as the first argument, and clear
> $@ to force people to use that argument instead of $@ itself;
> handy because $@ is maddeningly difficult to correctly preserve
> for testing.

Nice idea. I'll add it to the todo list (patches, with tests,  
welcome :-)

Cheers,

Adrian


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About