develooper Front page | perl.perl5.porters | Postings from January 2003

[perl #20339] Possible sprintf problem in perl5.8.0

Thread Next
From:
I-Lee, Jason D
Date:
January 16, 2003 15:23
Subject:
[perl #20339] Possible sprintf problem in perl5.8.0
Message ID:
21BEC9503B89D111A8F700805FE6A36907410B2B@xch-bne-01.bal.bna.boeing.com
Hugo and Yitzchak

Thanks both for your reply, the only reason we are using Text-Autoformat is
that Template-Toolkit has it as an optional requirement and Bugzilla
requires Template-Toolkit. I am not sure if Bugzilla really needs
Text-Autoformat as part of Template-Toolkit.

I will email Damian Conway and alert him to the possible problem with his
Text-Autoformat module and use of sprintf.

Thanks
Jason

-----Original Message-----
From: Hugo van der Sanden [mailto:perlbug-followup@perl.org]
Sent: Friday, 17 January 2003 2:57 AM
To: jason.d.lee@boeing.com
Subject: Re: [perl #20339] Possible sprintf problem in perl5.8.0


Jason Lee (via RT) <perlbug-followup@perl.org> wrote:
:After compiling and installing perl 5.8.0 without any problems I have
:encountered some weird behaviour with sprintf.
:
:This was highlighted by a failing "make test" of Text-Autoformt-1.04 module
:and later by some simple sprintf examples which can all be found as
detailed
:below.
[...]
:Simple example
:
:# perl -e 'print sprintf "%6.2lf\n", 1;'
:%6.2lf
:# perl -e 'print sprintf "%6.2f\n", 1;'
:  1.00

One of the side-effects of improvements to the sprintf code for 5.8.0
was stricter checking of size modifiers.

The docs for my local C library sprintf suggest that the "l" modifier
is relevant only for integer conversions and the "s" and "n" formats;
long doubles should be requested using "L", "q" or "ll". Do you have
reason to believe that "l" should also be supported? If not, I'd
suggest that Text-Autoformat may be wrong here.

Hugo

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About