You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by Stas Bekman <st...@stason.org> on 2003/08/13 23:57:11 UTC
Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache
Test.pm
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