r44865 - in /branches/upstream/libnumber-format-perl/current: CHANGES Format.pm META.yml t/locale.t
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Sat Sep 26 16:17:41 UTC 2009
Author: jawnsy-guest
Date: Sat Sep 26 16:16:53 2009
New Revision: 44865
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=44865
Log:
[svn-upgrade] Integrating new upstream version, libnumber-format-perl (1.73)
Modified:
branches/upstream/libnumber-format-perl/current/CHANGES
branches/upstream/libnumber-format-perl/current/Format.pm
branches/upstream/libnumber-format-perl/current/META.yml
branches/upstream/libnumber-format-perl/current/t/locale.t
Modified: branches/upstream/libnumber-format-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnumber-format-perl/current/CHANGES?rev=44865&op=diff
==============================================================================
--- branches/upstream/libnumber-format-perl/current/CHANGES (original)
+++ branches/upstream/libnumber-format-perl/current/CHANGES Sat Sep 26 16:16:53 2009
@@ -1,3 +1,9 @@
+Changes for version 1.73 (September 25, 2009)
+------------------------
+ - Fix locale.t for RUR/RUB distinction (thanks Kevin Phair; RT 46660/45833)
+ - Skip locale.t for BSD (thanks Zak B. Elep; RT 48481/46367)
+ - In _get_self add UNIVERSAL::isa check on ref (thanks Jordan Macdonald)
+
Changes for version 1.72 (May 5, 2009)
------------------------
- Use Makefile.PL based on suggestion in RT 38020
Modified: branches/upstream/libnumber-format-perl/current/Format.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnumber-format-perl/current/Format.pm?rev=44865&op=diff
==============================================================================
--- branches/upstream/libnumber-format-perl/current/Format.pm (original)
+++ branches/upstream/libnumber-format-perl/current/Format.pm Sat Sep 26 16:16:53 2009
@@ -211,7 +211,7 @@
other_vars => \@EXPORT_OTHER,
all => \@EXPORT_ALL );
-our $VERSION = '1.72';
+our $VERSION = '1.73';
# Refer to http://www.opengroup.org/onlinepubs/007908775/xbd/locale.html
# for more details about the POSIX variables
@@ -311,7 +311,9 @@
my $DefaultObject;
sub _get_self
{
- unless (ref $_[0])
+ # Not calling $_[0]->isa because that may result in unblessed
+ # reference error
+ unless (ref $_[0] && UNIVERSAL::isa($_[0], "Number::Format"))
{
$DefaultObject ||= new Number::Format();
unshift (@_, $DefaultObject);
@@ -1192,6 +1194,12 @@
=back
+=head1 CAVEATS
+
+Some systems, notably OpenBSD, may have incomplete locale support.
+Using this module together with L<setlocale(3)> in OpenBSD may therefore
+not produce the intended results.
+
=head1 BUGS
No known bugs at this time. Report bugs using the CPAN request
Modified: branches/upstream/libnumber-format-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnumber-format-perl/current/META.yml?rev=44865&op=diff
==============================================================================
--- branches/upstream/libnumber-format-perl/current/META.yml (original)
+++ branches/upstream/libnumber-format-perl/current/META.yml Sat Sep 26 16:16:53 2009
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Number-Format
-version: 1.72
+version: 1.73
abstract: Perl extension for formatting numbers
license: perl
author:
Modified: branches/upstream/libnumber-format-perl/current/t/locale.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnumber-format-perl/current/t/locale.t?rev=44865&op=diff
==============================================================================
--- branches/upstream/libnumber-format-perl/current/t/locale.t (original)
+++ branches/upstream/libnumber-format-perl/current/t/locale.t Sat Sep 26 16:16:53 2009
@@ -1,8 +1,17 @@
# -*- CPerl -*-
-use Test::More qw(no_plan);
+use Test::More;
use strict;
use warnings;
+
+BEGIN {
+ # Do not test when under OpenBSD; see
+ # http://www.in-ulm.de/~mascheck/locale/ and
+ # http://undeadly.org/cgi?action=article&sid=20030206041352
+ plan skip_all => 'OpenBSD C library lacks locale support'
+ if $^O =~ /^(openbsd|dragonfly)$/;
+ plan 'no_plan';
+}
BEGIN { use_ok('Number::Format') }
BEGIN { use_ok('POSIX') }
@@ -41,7 +50,7 @@
my $dec = $russian->{mon_decimal_point};
my $num = "123${sep}456${dec}79";
- is($russian->format_price(123456.789), "$num RUB ", "rubles");
+ like($russian->format_price(123456.789), qr/^$num RU[RB] $/, "rubles");
is($russian->unformat_number("$num RUB "), 123456.79, "unformat rubles");
is($russian->unformat_number($num), 123456.79, "unformat Russian 1");
$num = "123${sep}456$russian->{decimal_point}79";
More information about the Pkg-perl-cvs-commits
mailing list