httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache Test.pm
Date Wed, 13 Aug 2003 21:57:11 GMT
stas@apache.org wrote:
> stas        2003/08/13 15:00:25
> 
>   Modified:    perl-framework/Apache-Test/lib/Apache Test.pm
>   Log:
>   trick ok() into reporting the caller filename/line when a
>   sub-test fails in sok()

I love Perl!

>   -    ok $sub->();
>   +    my($package, $filename, $line) = caller;
>   +
>   +    # trick ok() into reporting the caller filename/line when a
>   +    # sub-test fails in sok()
>   +    return eval <<EOE;
>   +#line $line $filename
>   +    ok(\$sub->());
>   +EOE
>    }



__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Mime
View raw message