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

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

Thread Next
I-Lee, Jason D
January 16, 2003 15:23
[perl #20339] Possible sprintf problem in perl5.8.0
Message ID:
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.


-----Original Message-----
From: Hugo van der Sanden []
Sent: Friday, 17 January 2003 2:57 AM
Subject: Re: [perl #20339] Possible sprintf problem in perl5.8.0

Jason Lee (via RT) <> 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
:Simple example
:# perl -e 'print sprintf "%6.2lf\n", 1;'
:# 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.


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About