Re: tesing exceptions of Error.pm

2003-12-02 Thread Michael G Schwern
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!


Re: T::H 2.38

2003-12-02 Thread Andy Lester
prove begins with #!/usr/bin/perl and prove-switches.t
runs it with
my @actual = qx/$prove -Ifirst -D -I second -Ithird -Tvdb/;
A $^X should be inserted here.
(in bleadperl, the shebang line of prove is fixed when installed.)
What should be in prove's shebang?

xoa

--
Andy Lester
[EMAIL PROTECTED], AIM:petdance
http://petdance.com/ http://use.perl.org/~petdance/