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

[prev] [thread] [next] [Date index for 2004/12/10]

From: Geoffrey Young
Subject: Re: [mp2] return value of print can break legacy apps
Date: 16:48 on 10 Dec 2004

> 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).

> 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.

> 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.

--Geoff

        -- 
        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)

Re: [mp2] return value of print can break legacy apps
Geoffrey Young 16:48 on 10 Dec 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52