3

I'm trying to install Number::Format to use with Padre on Windows:

cpanm Number::Format

I get the following error. How can I fix this?

    cpanm (App::cpanminus) 1.7034 on perl 5.020002 built for MSWin32-x86-multi-thread-64int
Work directory is C:\Users\admin/.cpanm/work/1433356714.11300
You have make C:\STRAWB~1\c\bin\dmake.exe
You have LWP 6.08
Falling back to Archive::Tar 2.04
Searching Number::Format () on cpanmetadb ...
--> Working on Number::Format
Fetching http://www.cpan.org/authors/id/W/WR/WRW/Number-Format-1.73.tar.gz
-> OK
Unpacking Number-Format-1.73.tar.gz
Entering Number-Format-1.73
Checking configure dependencies from META.yml
Configuring Number-Format-1.73
Running Makefile.PL
Checking if your kit is complete...
Looks good
Generating a dmake-style Makefile
Writing Makefile for Number::Format
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have POSIX 0 ... Yes (1.38_03)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.98)
Checking if you have Test::More 0 ... Yes (1.001014)
Checking if you have Carp 0 ... Yes (1.3301)
Building and testing Number-Format-1.73
cp Format.pm blib\lib\Number\Format.pm
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/format_bytes.t ..... ok
t/format_negative.t .. ok
t/format_number.t .... ok
t/format_picture.t ... ok
t/format_price.t ..... ok
Invalid sep_by_space value at t/locale.t line 77.
# Looks like your test exited with 255 just after 5.
t/locale.t ........... 
Dubious, test returned 255 (wstat 65280, 0xff00)
All 5 subtests passed 
    (less 3 skipped subtests: 2 okay)
t/object.t ........... ok
t/round.t ............ ok
t/unformat_number.t .. ok

Test Summary Report
-------------------
t/locale.t         (Wstat: 65280 Tests: 5 Failed: 0)
  Non-zero exit status: 255
Files=9, Tests=147,  1 wallclock secs ( 0.11 usr +  0.03 sys =  0.14 CPU)
Result: FAIL
Failed 1/9 test programs. 0/147 subtests failed.
dmake.exe:  Error code 255, while making 'test_dynamic'
-> FAIL Installing Number::Format failed. See C:\Users\admin\.cpanm\work\1433356714.11300\build.log for details. Retry with --force to force install it.
Arnold
  • 49
  • 8
  • 1
    Please show the results for the test that failed, not the test summary. – ThisSuitIsBlackNot Jun 03 '15 at 18:08
  • @TSBN Thanks for your reply. Okay, but I don't no how doing... @r – Arnold Jun 03 '15 at 18:10
  • 2
    @Arnold: There is a lot of other test output above the part that says "Test Summary Output". That's what we need to see. Please edit your question to show all the output that you have, not just the summary. – Andy Lester Jun 03 '15 at 18:24
  • 1
    There's a bug report open against this - https://rt.cpan.org/Public/Bug/Display.html?id=71044. Too bad we can't close this question as a dupe of that. Regardless, the module needs a code change. – dsolimano Jun 03 '15 at 18:59
  • I've got a github pull request in with the author that fixes, I think, a few problems on Strawberry and Cygwin, if you want to test. https://github.com/DSolimano/number-format-perl – dsolimano Jun 08 '15 at 20:40
  • @@, I have see GitHub!. I will Stay with and us "regex". But wath brings the future? Next month I start with Win 10... (at this moment I have one election version) Probable i get und have news probleme? Thanks @r – Arnold Jun 09 '15 at 07:01
  • The module author just merged my changes, so you can go to his repo and get them. Not sure when the release is scheduled, but hopefully soon. – dsolimano Jun 09 '15 at 13:13
  • @Dsolimano, Thanks. So I will Wait ... 20:17:10@r – Arnold Jun 09 '15 at 18:18

1 Answers1

1

There's already a bug report for this. The issue hasn't been fixed yet, but somebody uploaded a patch that you can try:

Reason seems to be the POSIX module, which returns many "-1" values where Number::Format->new() expects missing hash keys... I was able to successfully test and install by using the attached patch as a workaround. But it might be smarter to fix this problem in the POSIX module.

Any time a module fails to build, you should check the CPAN Testers report. The tests are failing for Perl 5.20.0 on Window x64, so it's not just you.

ThisSuitIsBlackNot
  • 23,492
  • 9
  • 63
  • 110
  • @TSIBN, Hello Sir, Many thanks for answering! So I us regex..... At now you can close this topic. @r Nota Bene: with xml::twig i got : Falling back to Archive::Tar 2.04. But this is en under History. by – Arnold Jun 03 '15 at 19:13
  • 1
    @Arnold, "Falling back to Archive::Tar" is not a problem. It displays that when the Perl module is used instead of the `tar` command-line utility, a utility not usually present on Windows systems. – ikegami Jun 03 '15 at 19:48