This queue is for tickets about the Locale-SubCountry CPAN distribution.

Report information
The Basics
Id:
78157
Status:
resolved
Priority:
Low/Low

People
Owner:
kimryan [...] cpan.org
Requestors:
RSAVAGE [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
1.51
Fixed in:
(no value)

Attachments
Locale-SubCountry-1.51-Fix-subcountry-data-syntax.patch



Subject: Wide char in print
Hi Kim Compilation failed in require at t/main.t line 11. BEGIN failed--compilation aborted at t/main.t line 11. # Looks like your test exited with 255 before it could output anything. t/main.t .......... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 18/18 subtests Wide character in print at /home/ron/.cpanm/work/1341270209.30963/Locale-SubCountry- 1.51/blib/lib/Locale/SubCountry.pm line 484. t/pod-coverage.t .. ok # Failed test 'POD test for blib/lib/Locale/SubCountry.pm' # at /home/ron/perl5/perlbrew/perls/perl- 5.14.2/lib/site_perl/5.14.2/Test/Pod.pm line 182. # blib/lib/Locale/SubCountry.pm (269): Non-ASCII character seen before =encoding in 'L�k�an;'. Assuming ISO8859-1 # Looks like you failed 1 test of 2. t/pod.t ........... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests
From: ppisar@redhat.com
Dne Po 02.čec.2012 19:12:09, RSAVAGE napsal(a):
Show quoted text
> Hi Kim > > Compilation failed in require at t/main.t line 11. > BEGIN failed--compilation aborted at t/main.t line 11. > # Looks like your test exited with 255 before it could output anything. > t/main.t .......... > Dubious, test returned 255 (wstat 65280, 0xff00) > Failed 18/18 subtests > Wide character in print at > /home/ron/.cpanm/work/1341270209.30963/Locale-SubCountry- > 1.51/blib/lib/Locale/SubCountry.pm line 484. > t/pod-coverage.t .. ok > > # Failed test 'POD test for blib/lib/Locale/SubCountry.pm' > # at /home/ron/perl5/perlbrew/perls/perl- > 5.14.2/lib/site_perl/5.14.2/Test/Pod.pm line 182. > # blib/lib/Locale/SubCountry.pm (269): Non-ASCII character seen before > =encoding in 'L�k�an;'. Assuming ISO8859-1 > # Looks like you failed 1 test of 2. > t/pod.t ........... > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/2 subtests
I get this failure too. However the real problem is else. $ prove --blib --verbose t/main.t t/main.t .. 1..18 Badly formed sub country data in Macedonia, the former Yugoslav Republic of <name>Aračinovo</name Wide character in print at /home/petr/fedora/perl-Locale-SubCountry/Locale-SubCountry-1.51/blib/lib/Locale/SubCountry.pm line 486. Died at /home/petr/fedora/perl-Locale-SubCountry/Locale-SubCountry-1.51/blib/lib/Locale/SubCountry.pm line 487. Compilation failed in require at t/main.t line 11. BEGIN failed--compilation aborted at t/main.t line 11. The problem is not wide character on output (though it should be fixed too). The fault is due to die without any message. The message is printer to stdout (why not stderr?) which is hidden by Test::More: else { print "Badly formed sub country data in $country_name\n"; print $current_line,"\n"; die; } And the problem is missing closing angle bracket in lib/Locale/SubCountry/Data.pm:23269: <subcountry> → <name>Aračinovo</name <code>2</code> <FIPS>01</FIPS> </subcountry>
From: ppisar@redhat.com
Dne Po 02.čec.2012 19:12:09, RSAVAGE napsal(a):
Show quoted text
> Compilation failed in require at t/main.t line 11. > BEGIN failed--compilation aborted at t/main.t line 11. > # Looks like your test exited with 255 before it could output anything. > t/main.t .......... > Dubious, test returned 255 (wstat 65280, 0xff00) > Failed 18/18 subtests > Wide character in print at > /home/ron/.cpanm/work/1341270209.30963/Locale-SubCountry- > 1.51/blib/lib/Locale/SubCountry.pm line 484. > t/pod-coverage.t .. ok >
Attached patch fixes it. -- Petr
Subject: Locale-SubCountry-1.51-Fix-subcountry-data-syntax.patch
From c9c8170e527bb4e74618b01efd7b066229701e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Tue, 3 Jul 2012 13:11:10 +0200 Subject: [PATCH] Fix subcountry data syntax <https://rt.cpan.org/Public/Bug/Display.html?id=78157> --- lib/Locale/SubCountry.pm | 5 ++--- lib/Locale/SubCountry/Data.pm | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/Locale/SubCountry.pm b/lib/Locale/SubCountry.pm index 8d86bd8..567a8a7 100644 --- a/lib/Locale/SubCountry.pm +++ b/lib/Locale/SubCountry.pm @@ -480,9 +480,8 @@ our $VERSION = '1.51'; } else { - print "Badly formed sub country data in $country_name\n"; - print $current_line,"\n"; - die; + die "Badly formed sub country data in ", + "$country_name: $current_line\n"; } } } diff --git a/lib/Locale/SubCountry/Data.pm b/lib/Locale/SubCountry/Data.pm index ba6caba..dd8c8ed 100644 --- a/lib/Locale/SubCountry/Data.pm +++ b/lib/Locale/SubCountry/Data.pm @@ -23266,7 +23266,7 @@ q{ <FIPS>F3</FIPS> </subcountry> <subcountry> - <name>Aračinovo</name + <name>Aračinovo</name> <code>2</code> <FIPS>01</FIPS> </subcountry> @@ -23416,7 +23416,7 @@ q{ <FIPS>40</FIPS> </subcountry> <subcountry> - <name>Karpoš/name> + <name>Karpoš</name> <code>38</code> <FIPS>41</FIPS> </subcountry> @@ -24175,4 +24175,4 @@ q{ }; #------------------------------------------------------------------------------- -1; \ No newline at end of file +1; -- 1.7.7.6
Fixed in 1.56 Error mesaages now go to STDERR by placing meassgae after the die command Added missing closing delimiters to xml data
On Sun Jul 08 20:51:21 2012, KIMRYAN wrote:
Show quoted text
> Fixed in 1.56 > Error mesaages now go to STDERR by placing meassgae after the die > command > Added missing closing delimiters to xml data
Note, I think wide character warning message is caused by not using utf- 8 aware testing modules


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.