Joe Schaefer wrote:
Stas Bekman <[EMAIL PROTECTED]> writes:

[...]


Thanks in advance for looking this over- I'll be happy to
explain it in more detail if anyone is interested.

I think it'd be beneficial to document the logic in the code that
implements it.


And also update the APR::Table manpage :)


Gladly, assuming the new FETCH (eg. scalar get()) behavior
is desirable: eg within an each() iteration, scalar $t->get("foo") will pick the _current_ "foo" value, not necessarily the first "foo". The old behavior (
$t->get("foo") fetches the first value ) still applies everywhere else.

As long as it's documented, I think it's perfectly fine. The only question I have is this:


What happens if each() doesn't run exhaustively, does that mean that $t->get() will continue to give the last value it gave inside the each() block and not the first one?

I suppose that's the case, and if so, this should be documented as well.

Keep in mind this only fixes each(), values() remains
fundamentally broken for multivalued keys (the MAGIC_KEYS code in apreq2 circumvents this problem, btw).

I'm sure it won't take too long before we will see another patch from the productive Joe-machine house :)


But if you don't mind leave that test alone and instead extend
t/response/TestAPR/table.pm, since that's where it all tested.


True, but it's MUCH quicker to run the standalone apr-ext tests while developing: eg.

% t/TEST -no-httpd apr-ext # avoids ~30sec httpd startup delay

Shouldn't be the case with the latest Apache::Test, prefork should take just a few secs to start. But once we handle that apr-ext/apr one source two tests solution, you should be able to do either of the two.


As mentioned before, I'd love to see apr-ext/ and non-apr-ext somehow
re-using the same tests, instead of duplicating and spreading them all
over, making it hard to maintain.

If it's too much of a bother, I can do that move.


Why not just copy them there instead of moving them?
I don't see the harm in having some redundancy in the test suite.

That's not a redundancy, that's a duplication. If later on you change something in one of the tests you need to do it in two places. Instead, it should be one source invoked from both places.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to