perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <>
Subject Re: [mp2] return value of print can break legacy apps
Date Fri, 10 Dec 2004 16:48:38 GMT

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


Report problems:
Mail list info:
List etiquette:

View raw message