Re: [mp2] return value of print can break legacy apps

2004-12-10 Thread Geoffrey Young
> Sure, +1 then for your patch. done > But should > http://perl.apache.org/docs/2.0/api/Apache/RequestIO.html#C_print_ > mention that 0E0 nuance? done --Geoff -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://

Re: [mp2] return value of print can break legacy apps

2004-12-10 Thread Stas Bekman
Geoffrey Young wrote: It certainly is an API change. At least it makes the API inconsistent since now: $r->print(""); and print ""; are not the same under modperl. um, how do you figure? the new tests show that those two calls are exactly the same - they both return '0E0' (at least when print() i

Re: [mp2] return value of print can break legacy apps

2004-12-10 Thread Geoffrey Young
> It certainly is an API change. At least it makes the API inconsistent > since now: > > $r->print(""); > > and > > print ""; > > are not the same under modperl. um, how do you figure? the new tests show that those two calls are exactly the same - they both return '0E0' (at least when print(

Re: [mp2] return value of print can break legacy apps

2004-12-10 Thread Stas Bekman
Geoffrey Young wrote: ok, try this patch. ah, please hold on with patches to change API, if you change this you will need to change a lot more (printf, puts, and probably read and may be others too). I was responding to your other mail, but I'll answer here instead :) I don't think it's really an

Re: [mp2] return value of print can break legacy apps

2004-12-10 Thread Geoffrey Young
>> ok, try this patch. > > > ah, please hold on with patches to change API, if you change this you > will need to change a lot more (printf, puts, and probably read and may > be others too). I was responding to your other mail, but I'll answer here instead :) I don't think it's really an API c

Re: [mp2] return value of print can break legacy apps

2004-12-10 Thread Stas Bekman
Geoffrey Young wrote: Tuomo Salo wrote: Under mod_perl2 the return value of print seems to be the number of bytes printed. I run across a legacy app (a registry script), that frequently used the following idiom: print(CGI::redirect("url_to_error_page")) and return if $error; While this is obviously

Re: [mp2] return value of print can break legacy apps

2004-12-10 Thread Geoffrey Young
Tuomo Salo wrote: > Under mod_perl2 the return value of print seems to be the number of > bytes printed. I run across a legacy app (a registry script), that > frequently used the following idiom: > > > print(CGI::redirect("url_to_error_page")) and return if $error; > > > While this is obvious

Re: [mp2] return value of print can break legacy apps

2004-12-10 Thread Stas Bekman
Tuomo Salo wrote: Under mod_perl2 the return value of print seems to be the number of bytes printed. I run across a legacy app (a registry script), that frequently used the following idiom: [...] This behaviour is nearly impossible to notice, since the redirection will happen as usual. The resultin

[mp2] return value of print can break legacy apps

2004-12-10 Thread Tuomo Salo
Under mod_perl2 the return value of print seems to be the number of bytes printed. I run across a legacy app (a registry script), that frequently used the following idiom: print(CGI::redirect("url_to_error_page")) and return if $error; While this is obviously a stupid way to write, it seems ok sinc