develooper Front page | perl.perl5.porters | Postings from December 2017

Re: [perl #131875] please correct perlfunc to tell when "sprintf@..." is useful

Thread Previous
From:
Dave Mitchell
Date:
December 15, 2017 08:53
Subject:
Re: [perl #131875] please correct perlfunc to tell when "sprintf@..." is useful
Message ID:
20171215085322.GC3108@iabyn.com
On Fri, Dec 15, 2017 at 07:19:54AM +0000, Zefram wrote:
> There is nothing to change here.  sprintf with an array as first argument
> is not useful, but scalar context is useful and, more importantly,
> likely to have code relying on it.  There's nothing more to say in the
> documentation, and we can't change the behaviour for backcompat reasons.
> This ticket should be closed.

I still intend at some point to add a warning when the first arg of
sprintf is an array, as in

    sprintf @foo ...

since that almost certainly represents a coding error.

-- 
You're only as old as you look.

Thread Previous


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