httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: switching t_cmp() argument order
Date Wed, 09 Jun 2004 19:50:47 GMT

> But it's quite possible that argument could be readonly while not a
> string, a simple example is a return value of a function:
> 
> % perl -le 'a(b(), "b"); sub a {($_[0], $_[1]) = ($_[1], $_[0]);}; \
>             sub b { 5 }'
> Modification of a read-only value attempted at -e line 1.

I think you need to revisit that example :)

nevertheless, the by-reference nature of $@ was getting in the way of a few
mod_perl tests that I didn't notice before, so I needed to use intermediate
variables anyway :)

> I'd rather see t_is_equal and t_cmp have identical API, if it's not too
> much of a trouble to you.

ok, the attached patch reflects that.

> btw, you don't need to craft \n in t_debug:
> just pass an array and it'll add them for you:

done

--Geoff

Mime
View raw message