Skip to content
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

[PATCH] 5.24 perldelta sprintf typo? #15284

Closed
p5pRT opened this issue Apr 19, 2016 · 7 comments
Closed

[PATCH] 5.24 perldelta sprintf typo? #15284

p5pRT opened this issue Apr 19, 2016 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented Apr 19, 2016

Migrated from rt.perl.org#127936 (status was 'resolved')

Searchable as RT127936$

@p5pRT
Copy link
Author

p5pRT commented Apr 19, 2016

From @Smylers

This is a bug report for perl from smylers@​stripey.com,
generated with the help of perlbug 1.40 running under perl 5.24.0.


perldelta for 5.24 RC1 includes​:

  sprintf '|%.*2$|', 2, 3 now returns |002|

That gives an error. Putting a d in there gives the stated output.



Flags​:
  category=docs
  severity=medium
  Type=Patch
  PatchStatus=HasPatch


Site configuration information for perl 5.24.0​:

Configured by smylers at Tue Apr 19 18​:08​:18 BST 2016.

Summary of my perl5 (revision 5 version 24 subversion 0) configuration​:
  Commit id​: 19d6c38
  Platform​:
  osname=linux, osvers=3.13.0-85-generic, archname=x86_64-linux
  uname='linux fozzie 3.13.0-85-generic #129-ubuntu smp thu mar 17 20​:50​:15 utc 2016 x86_64 x86_64 x86_64 gnulinux '
  config_args='-des -Dusedevel'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=undef, usemultiplicity=undef
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-O2',
  cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.8.4', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
  ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
  libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.19.so, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.19'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
  cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'

Locally applied patches​:
  RC1


@​INC for perl 5.24.0​:
  lib
  /usr/local/lib/perl5/site_perl/5.24.0/x86_64-linux
  /usr/local/lib/perl5/site_perl/5.24.0
  /usr/local/lib/perl5/5.24.0/x86_64-linux
  /usr/local/lib/perl5/5.24.0
  .


Environment for perl 5.24.0​:
  HOME=/home/smylers
  LANG=en_GB.utf8
  LANGUAGE=en_GB​:en
  LC_COLLATE=C
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/home/smylers/bin​:/usr/local/sbin​:/usr/local/bin​:/sbin​:/bin​:/usr/sbin​:/usr/bin​:/usr/X11R6/bin​:/usr/games
  PERL_BADLANG (unset)
  PERL_CPANM_OPT=--sudo --prompt
  SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Apr 19, 2016

From @Smylers

0001-Typo-fix-in-sprintf-example.patch
From d599f24515043eb6597cd648b431aa53373fc0fb Mon Sep 17 00:00:00 2001
From: Smylers <Smylers@stripey.com>
Date: Tue, 19 Apr 2016 22:19:43 +0100
Subject: [PATCH] Typo fix in sprintf example

---
 pod/perldelta.pod | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git pod/perldelta.pod pod/perldelta.pod
index ef1cc4d8..3bb3b6c0 100644
--- pod/perldelta.pod
+++ pod/perldelta.pod
@@ -81,7 +81,7 @@ the C<bigint> pragma, or the C<Bit::Vector> module from CPAN.
 
 =head2 printf and sprintf now allow reordered precision arguments
 
-That is, C<< sprintf '|%.*2$|', 2, 3 >> now returns C<|002|>. This extends
+That is, C<< sprintf '|%.*2$d|', 2, 3 >> now returns C<|002|>. This extends
 the existing reordering mechanism (which allows reordering for arguments
 that are used as format fields, widths, and vector separators).
 
-- 
1.9.1

@p5pRT
Copy link
Author

p5pRT commented Apr 20, 2016

From @tonycoz

On Tue Apr 19 14​:26​:18 2016, smylers@​stripey.com wrote​:

perldelta for 5.24 RC1 includes​:

sprintf '|%.*2$|', 2, 3 now returns |002|

That gives an error. Putting a d in there gives the stated output.

Thanks, fixed in 319b236.

Tony

@p5pRT
Copy link
Author

p5pRT commented Apr 20, 2016

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Apr 20, 2016

@tonycoz - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Author

p5pRT commented May 13, 2016

From @khwilliamson

Thank you for submitting this report. You have helped make Perl better.
 
With the release of Perl 5.24.0 on May 9, 2016, this and 149 other issues have been resolved.

Perl 5.24.0 may be downloaded via https://metacpan.org/release/RJBS/perl-5.24.0

@p5pRT
Copy link
Author

p5pRT commented May 13, 2016

@khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant