New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
overeager sprintf missing argument warnings #14092
Comments
From @demerphqIf we have an invalid format conversion we should not complain it is $ perl -wE'say sprintf "%/"' I contend that the first warning should not be produced. If the format Similarly we should not warn multiple times about missing arguments in perl -wE'say sprintf "%s%s"' My perl -v is as follows: This is perl 5, version 14, subversion 2 (v5.14.2) built for Although this applies to bleadperl as well. -- |
From @avarOn þri 16 sep 15:20:31 2014, demerphq wrote:
FWIW since you mentioned this as possibly being related to my recent These classes of warnings could definitely be improved, just some * I think we don't want to have a warning system where we cause users I.e. if you make this mistake, wanting %s: $ ./perl -we 'printf "Hello %S"' I think it arguably makes more sense to warn about both the * I think rather than collapsing this warning and only warning once $ ./perl -Ilib -wE 'printf "%S%/%\\"' IMO it would be more useful to say which invalid pseudo-format is Finally just as an implementation detail if we were to fold these |
The RT System itself - Status changed from 'new' to 'open' |
From lasse.makholm@gmail.comOn 21 September 2014 19:34, Ævar Arnfjörð Bjarmason via RT
Repeating the missing argument warning doesn't make sense IMO. Consider: printf "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n ", @stuff; In that case, a message like: Missing 15 arguments in printf; expected 16, got 1 Is a lot more useful and results in fewer moles to be whacked than
That doesn't make sense IMO. Invalid conversions don't consume Perl (v5.14.2) itself seems indecisive as to whether an invalid $ perl -w -e 'printf "%s%S%s\n", 1, 2' Why, by removing one arguement, do we jump from from 0 to 2 missing /L
|
From @demerphqOn 21 September 2014 22:22, Lasse Makholm <lasse.makholm@gmail.com> wrote:
Yeah I agree.
Again I agree.
This is getting repetitive. I agree again. Yves |
From @avarOn Sun, Sep 21, 2014 at 10:22 PM, Lasse Makholm <lasse.makholm@gmail.com> wrote:
Yes, that would of course be more useful, since you don't get into I'm saying that we shouldn't fix it by only printing the first
|
From @jhiOn Sunday-201409-21, 13:34, Ævar Arnfjörð Bjarmason via RT wrote:
FWIW, while doing my recent floating point, ahem, renovations I've |
From @demerphqOn 22 September 2014 17:11, Jarkko Hietaniemi <jhi@iki.fi> wrote:
Funny, when I just now looked at fixing this ticket I started thinking the Yves -- |
Migrated from rt.perl.org#122793 (status was 'open')
Searchable as RT122793$
The text was updated successfully, but these errors were encountered: