summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl-5.12.2/debian/fixes/lc-numeric-docs.diff
diff options
context:
space:
mode:
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.diff95
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 @@
1From: Niko Tyni <ntyni@debian.org>
2Subject: LC_NUMERIC documentation fixes
3Bug-Debian: http://bugs.debian.org/379329
4Bug: http://rt.perl.org/rt3/Ticket/Display.html?id=78452
5Origin: upstream, http://perl5.git.perl.org/perl.git/commit/903eb63f7d8d47a38971a8e9af7201b9927882cf
6
7LC_NUMERIC documentation updates fixing two errors:
8
9 - the early parts of perllocale.pod still say printf() uses LC_NUMERIC
10 with just 'use locale' when actually a POSIX::setlocale() call is
11 also needed
12
13 - format() hasn't used LC_NUMERIC unconditionally since 5.005_03
14 (commit 097ee67dff1c60f201bc09435bc6eaeeafcd8123).
15
16Test cases from the upstream commit dropped for the sake of simplicity.
17
18---
19 pod/perlform.pod | 20 ++++++++------------
20 pod/perllocale.pod | 15 ++++++---------
21 2 files changed, 14 insertions(+), 21 deletions(-)
22
23diff --git a/pod/perlform.pod b/pod/perlform.pod
24index 3cfa1b7..df0f0a1 100644
25--- a/pod/perlform.pod
26+++ b/pod/perlform.pod
27@@ -166,9 +166,9 @@ token on the first line. If an expression evaluates to a number with a
28 decimal part, and if the corresponding picture specifies that the decimal
29 part should appear in the output (that is, any picture except multiple "#"
30 characters B<without> an embedded "."), the character used for the decimal
31-point is B<always> determined by the current LC_NUMERIC locale. This
32-means that, if, for example, the run-time environment happens to specify a
33-German locale, "," will be used instead of the default ".". See
34+point is determined by the current LC_NUMERIC locale if C<use locale> is in
35+effect. This means that, if, for example, the run-time environment happens
36+to specify a German locale, "," will be used instead of the default ".". See
37 L<perllocale> and L<"WARNINGS"> for more information.
38
39
40@@ -442,15 +442,11 @@ Lexical variables (declared with "my") are not visible within a
41 format unless the format is declared within the scope of the lexical
42 variable. (They weren't visible at all before version 5.001.)
43
44-Formats are the only part of Perl that unconditionally use information
45-from a program's locale; if a program's environment specifies an
46-LC_NUMERIC locale, it is always used to specify the decimal point
47-character in formatted output. Perl ignores all other aspects of locale
48-handling unless the C<use locale> pragma is in effect. Formatted output
49-cannot be controlled by C<use locale> because the pragma is tied to the
50-block structure of the program, and, for historical reasons, formats
51-exist outside that block structure. See L<perllocale> for further
52-discussion of locale handling.
53+If a program's environment specifies an LC_NUMERIC locale and C<use
54+locale> is in effect when the format is declared, the locale is used
55+to specify the decimal point character in formatted output. Formatted
56+output cannot be controlled by C<use locale> at the time when write()
57+is called. See L<perllocale> for further discussion of locale handling.
58
59 Within strings that are to be displayed in a fixed length text field,
60 each control character is substituted by a space. (But remember the
61diff --git a/pod/perllocale.pod b/pod/perllocale.pod
62index 0dbabe7..0bec423 100644
63--- a/pod/perllocale.pod
64+++ b/pod/perllocale.pod
65@@ -115,8 +115,7 @@ ucfirst(), and lcfirst()) use C<LC_CTYPE>
66
67 =item *
68
69-B<The formatting functions> (printf(), sprintf() and write()) use
70-C<LC_NUMERIC>
71+B<Format declarations> (format()) use C<LC_NUMERIC>
72
73 =item *
74
75@@ -967,13 +966,11 @@ system's implementation of the locale system than by Perl.
76
77 =head2 write() and LC_NUMERIC
78
79-Formats are the only part of Perl that unconditionally use information
80-from a program's locale; if a program's environment specifies an
81-LC_NUMERIC locale, it is always used to specify the decimal point
82-character in formatted output. Formatted output cannot be controlled by
83-C<use locale> because the pragma is tied to the block structure of the
84-program, and, for historical reasons, formats exist outside that block
85-structure.
86+If a program's environment specifies an LC_NUMERIC locale and C<use
87+locale> is in effect when the format is declared, the locale is used
88+to specify the decimal point character in formatted output. Formatted
89+output cannot be controlled by C<use locale> at the time when write()
90+is called.
91
92 =head2 Freely available locale definitions
93
94--
95tg: (c823880..) fixes/lc-numeric-docs (depends on: upstream)