In perl.git, the branch smoke-me/khw-locale has been created

<http://perl5.git.perl.org/perl.git/commitdiff/a3d87184c1dce3c324941b9dc9ee80c847dd7fdf?hp=0000000000000000000000000000000000000000>

        at  a3d87184c1dce3c324941b9dc9ee80c847dd7fdf (commit)

- Log -----------------------------------------------------------------
commit a3d87184c1dce3c324941b9dc9ee80c847dd7fdf
Author: Karl Williamson <[email protected]>
Date:   Tue Jul 16 22:02:46 2013 -0600

    Move some tests from cpan/version to t/run
    
    Commit fb7942811c8097ed2e61fd35a90345226546176a just moved version.pm to
    cpan.  Earlier, in commit b127e37e51c21b0a36755dcd19811be931a03d83, I
    had added tests to version's .t that arguably belonged elsewhere.  I did
    this because I thought that this .t was the only one around that had the
    infrastructure already written to allow such tests to easily be added,
    and it was in /lib so p5p controlled it.  (That infrastructure being
    finding locales with the decimal point not a dot.)  Since then, I found
    that t/run/locale.t has similar infrastructure.  Given that version now
    may end up being cpan upstream, I thought it best to move those tests to
    t/run/locale.t
    
    I notice that changes to this .t prior to these no longer were careful
    to avoid 'use locale' in case the platform doesn't support it, and there
    have been no field problems; so I just went ahead and did a 'use locale'
    too.

M       cpan/version/t/07locale.t
M       t/run/locale.t

commit 31d417b4ce140225cdd06c3dc29ffe23d7123e28
Author: Karl Williamson <[email protected]>
Date:   Tue Jul 16 22:05:57 2013 -0600

    cpan/version/t/07locale.t: Actually test what is claimed
    
    Commit b127e37e51c21b0a36755dcd19811be931a03d83 wrongly changed a test
    from 'eq' to '=='.  It had this diff:
    
     -       is ($v, "1.23", "Locale doesn't apply to version objects");
     +       ok ($v == "1.23", "Locale doesn't apply to version objects");
    
    (The code for is() does an 'eq'.)  The is() call is made from within the
    scope of a "use locale" in which the decimal point character is a comma,
    but version objects are supposed to always use a dot, regardless of the
    locale.  The == will numify the operands, potentially throwing away the
    locale's decimal point character.  Therefore the test should use an
    'eq'.
    
    What the change in that commit did get right is that is() also didn't
    test what it purported to.  The reason is that the is() is defined in a
    different file which is outside the locale scope, so that $v there
    should have a dot even if it has a comma within locale scope, and hence
    doing an is() would not catch such a bug.

M       cpan/version/t/07locale.t

commit 2252b3ce72ec192f8fd9a9f53eab0231b3418b7e
Author: Karl Williamson <[email protected]>
Date:   Sun Jul 14 20:38:17 2013 -0600

    More changes to perllocale and POSIX.pod setlocale
    
    These address some concerns from John Peacock.

M       ext/POSIX/lib/POSIX.pod
M       pod/perllocale.pod

commit b4cab9c5e3ee5540935fa106f3d75856a9666797
Author: Karl Williamson <[email protected]>
Date:   Sat Jul 13 13:43:31 2013 -0600

    Assume UTF-8 locale if that string occurs anywhere in name
    
    When a platform doesn't have nl_langinfo(), heuristics are employed
    to see if a locale is UTF-8 .  The first heuristic is looking at the
    return value of setlocale(), which generally is the locale name.
    However, in actuality the return value is opaque and can't be relied on
    to signify the locale.  Nevertheless if it contains the string UTF-8
    (ignoring case, and with the hyphen optional), it is a safe bet that the
    locale is indeed UTF-8.  Prior to this patch, we only looked at the end
    of the name for "UTF-8".  This patch makes it not have to be
    right-anchored.  There are UTF-8 locales on our dromedary machine with
    UTF-8 in the middle of their names.

M       locale.c

commit 39ced096318c9aba5e31be02eb17d658db5c0523
Author: Karl Williamson <[email protected]>
Date:   Wed Jun 19 13:12:49 2013 -0600

    sv.h: Add comment

M       sv.h
-----------------------------------------------------------------------

--
Perl5 Master Repository

Reply via email to