On Thu, Nov 27, 2003 at 10:02:10PM +0200, Gabor Szabo wrote:
> How am I going to test this ?
> I came up with the following in the test script:
>
>
> use Error qw(:try);
>
>
> my $ex;
> try {
> f();
> }
> catch MyError with {
> $ex = shift;
> };
> like($ex, qr/Bad thing happened/, 'successfully tested bad thing');
>
>
> Now $ex is global but I think I cannot test within the catch block.
Why not?
catch MyError with {
like( $ex, qr/Bad thing/ );
};
--
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/
Good tidings, my native American Indian friend! America will soon again
be yours! Please accept 5th Avenue as an initial return!