diff options
Diffstat (limited to 'meta/recipes-devtools/perl/perl-5.12.2/debian/fixes/lc-numeric-docs.diff')
-rw-r--r-- | meta/recipes-devtools/perl/perl-5.12.2/debian/fixes/lc-numeric-docs.diff | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.12.2/debian/fixes/lc-numeric-docs.diff b/meta/recipes-devtools/perl/perl-5.12.2/debian/fixes/lc-numeric-docs.diff new file mode 100644 index 0000000000..bb5c0e8c10 --- /dev/null +++ b/meta/recipes-devtools/perl/perl-5.12.2/debian/fixes/lc-numeric-docs.diff @@ -0,0 +1,95 @@ +From: Niko Tyni <ntyni@debian.org> +Subject: LC_NUMERIC documentation fixes +Bug-Debian: http://bugs.debian.org/379329 +Bug: http://rt.perl.org/rt3/Ticket/Display.html?id=78452 +Origin: upstream, http://perl5.git.perl.org/perl.git/commit/903eb63f7d8d47a38971a8e9af7201b9927882cf + +LC_NUMERIC documentation updates fixing two errors: + + - the early parts of perllocale.pod still say printf() uses LC_NUMERIC + with just 'use locale' when actually a POSIX::setlocale() call is + also needed + + - format() hasn't used LC_NUMERIC unconditionally since 5.005_03 + (commit 097ee67dff1c60f201bc09435bc6eaeeafcd8123). + +Test cases from the upstream commit dropped for the sake of simplicity. + +--- + pod/perlform.pod | 20 ++++++++------------ + pod/perllocale.pod | 15 ++++++--------- + 2 files changed, 14 insertions(+), 21 deletions(-) + +diff --git a/pod/perlform.pod b/pod/perlform.pod +index 3cfa1b7..df0f0a1 100644 +--- a/pod/perlform.pod ++++ b/pod/perlform.pod +@@ -166,9 +166,9 @@ token on the first line. If an expression evaluates to a number with a + decimal part, and if the corresponding picture specifies that the decimal + part should appear in the output (that is, any picture except multiple "#" + characters B<without> an embedded "."), the character used for the decimal +-point is B<always> determined by the current LC_NUMERIC locale. This +-means that, if, for example, the run-time environment happens to specify a +-German locale, "," will be used instead of the default ".". See ++point is determined by the current LC_NUMERIC locale if C<use locale> is in ++effect. This means that, if, for example, the run-time environment happens ++to specify a German locale, "," will be used instead of the default ".". See + L<perllocale> and L<"WARNINGS"> for more information. + + +@@ -442,15 +442,11 @@ Lexical variables (declared with "my") are not visible within a + format unless the format is declared within the scope of the lexical + variable. (They weren't visible at all before version 5.001.) + +-Formats are the only part of Perl that unconditionally use information +-from a program's locale; if a program's environment specifies an +-LC_NUMERIC locale, it is always used to specify the decimal point +-character in formatted output. Perl ignores all other aspects of locale +-handling unless the C<use locale> pragma is in effect. Formatted output +-cannot be controlled by C<use locale> because the pragma is tied to the +-block structure of the program, and, for historical reasons, formats +-exist outside that block structure. See L<perllocale> for further +-discussion of locale handling. ++If a program's environment specifies an LC_NUMERIC locale and C<use ++locale> is in effect when the format is declared, the locale is used ++to specify the decimal point character in formatted output. Formatted ++output cannot be controlled by C<use locale> at the time when write() ++is called. See L<perllocale> for further discussion of locale handling. + + Within strings that are to be displayed in a fixed length text field, + each control character is substituted by a space. (But remember the +diff --git a/pod/perllocale.pod b/pod/perllocale.pod +index 0dbabe7..0bec423 100644 +--- a/pod/perllocale.pod ++++ b/pod/perllocale.pod +@@ -115,8 +115,7 @@ ucfirst(), and lcfirst()) use C<LC_CTYPE> + + =item * + +-B<The formatting functions> (printf(), sprintf() and write()) use +-C<LC_NUMERIC> ++B<Format declarations> (format()) use C<LC_NUMERIC> + + =item * + +@@ -967,13 +966,11 @@ system's implementation of the locale system than by Perl. + + =head2 write() and LC_NUMERIC + +-Formats are the only part of Perl that unconditionally use information +-from a program's locale; if a program's environment specifies an +-LC_NUMERIC locale, it is always used to specify the decimal point +-character in formatted output. Formatted output cannot be controlled by +-C<use locale> because the pragma is tied to the block structure of the +-program, and, for historical reasons, formats exist outside that block +-structure. ++If a program's environment specifies an LC_NUMERIC locale and C<use ++locale> is in effect when the format is declared, the locale is used ++to specify the decimal point character in formatted output. Formatted ++output cannot be controlled by C<use locale> at the time when write() ++is called. + + =head2 Freely available locale definitions + +-- +tg: (c823880..) fixes/lc-numeric-docs (depends on: upstream) |