Re: [mp2] return value of print can break legacy apps
[prev]
[thread]
[next]
[Date index for 2004/12/10]
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() is using STDOUT,
> which is all we could ever hope to accomplish).
Yes, sorry, for some reason I thought only the PRINT wrapper was affected.
I stand corrected.
>>Moreover, failures are not the same as perl's print. so it's really only
>>a partial fix. (even though the manpage doesn't say what happens on
>>failure, but we know that it returns 0).
>
>
> yeah, but that's not likely to cause userland troubles.
>
> the issue here, as I see it is mostly that the return value of
> print()/$r->print() under mp1 is different than under mp2 when printing zero
> bytes. and it's one that is easily fixed in a way that is unlikely to catch
> anyone by surprise.
OK
>>I'm not against patches, I just want us to decide first what's to be
>>done (if at all) and then move on with implementation, rather than the
>>other way around.
>
>
> well, I'm out of time at the moment. if you want to incorporate the idea
> then you have a patch to start with. otherwise, don't worry about it.
Sure, +1 then for your patch.
But should
http://perl.apache.org/docs/2.0/api/Apache/RequestIO.html#C_print_
mention that 0E0 nuance?
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
 |
(message missing)
|