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:09 on 10 Dec 2004

>> 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 change and I don't think it's as complex as
all of that...

the perldoc for print() says it returns true on success, whereas the perldoc
for printf(), send(), read() make no such claims.

so, the change to print() would be to make it behave the same as perl's
print() (which it isn't and which is different between mp1 and mp2), with
the added benefit that it returns the numeric number of characters printed.

anyway, all tests pass with my patch, and the only change needed was to
request_rec.t where t_cmp does a string instead of a numerical comparison in
the test.

--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:09 on 10 Dec 2004

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