develooper Front page | perl.perl5.porters | Postings from October 2011

Re: [perl #100190] RFE: fix sprintf to be consistent with printf andbe useful!

Thread Previous | Thread Next
Brian Fraser
October 5, 2011 14:38
Re: [perl #100190] RFE: fix sprintf to be consistent with printf andbe useful!
Message ID:
On Sat, Oct 1, 2011 at 1:18 PM, Linda Walsh <> wrote:

> [...]You CAN
> pass an array to it, it just is BAD code -- it certainly doesn't throw an
> syntax error -- it allows an array there, which, "___is [almost]^ never
> useful__".  [...]
You know.
That's actually true.
There's a bug in a handful of modules because of this; See\s*\%28%3F\s*\%40 and\s*\%28
Changing it takes two lines of code (regen/opcodes and t/op/cproto.t) and a
regen, plus doc/delta changes. I was under the impression that @ is a
superset of $@, so there's no lost functionality either -- I'm running (a
very slow) make test right now, and nothing is failing, so this behavior
wasn't even tested for! (or I haven't reached that part yet, but
op/sprintf.t and op/sprintf2.t passed without issues)

And it's not like prototypes haven't been changed before (to tchrist's
chagrin, e.g.

So eh, any reason why this can't be changed? If anyone needs a compat layer,
I imagine it's trivial enough to provide through Classic::Perl/Modern::Perl,
or somesuch.

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