Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Strawberry Perl cannot locate Statistics/

by pimperator (Acolyte)
on Jul 11, 2014 at 18:55 UTC ( [id://1093288] : perlquestion . print w/replies, xml ) Need Help??

pimperator has asked for the wisdom of the Perl Monks concerning the following question:

I'm dumb

Replies are listed 'Best First'.
Re: Strawberry Perl cannot locate Statistics/
by marto (Cardinal) on Jul 11, 2014 at 20:07 UTC

    Please read my update at the end of this post.

    Statistics::Basic is not a core module and is not part of the Strawberry Perl distribution. Normally to install this open a command prompt and type:

    cpan Statistics::Basic

    This should retrieve and install Statistics::Basic and its dependencies.However you'll need to patch it (because of this bug on Number::Format, a prerequisite) like so, again from the command line:

    cpan cpan> look Number::Format Database was generated on Fri, 11 Jul 2014 11:23:06 GMT Running look for module 'Number::Format' Trying to open a subshell in the build directory... Checksum for D:\cpan\authors\id\W\WR\WRW\Number-Format-1.73.tar.gz ok Scanning cache D:\perl\cpan\build for sizes ...................................................................... +......DONE Working directory is D:\perl\cpan\build\Number-Format-1.73-L6b3hX Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. D:\perl\cpan\build\Number-Format-1.73-L6b3hX>

    At this point save this file to the path displayed in your prompt (in my example it's D:\perl\cpan\build\Number-Format-1.73-L6b3hX, it'll be slightly different for you). Then back at the command prompt:

    D:\perl\cpan\build\Number-Format-1.73-L6b3hX>patch --binary < Number_F patching file D:\perl\cpan\build\Number-Format-1.73-L6b3hX>perl 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 D:\perl\cpan\build\Number-Format-1.73-L6b3hX>dmake cp blib\lib\Number\ D:\perl\cpan\build\Number-Format-1.73-L6b3hX>dmake test D:\perl\perl\bin\perl.exe "-MExtUtils::Command::MM" "-MTest::Harness" +"-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'bl +ib\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 t/locale.t ........... ok t/object.t ........... ok t/round.t ............ ok t/unformat_number.t .. ok All tests successful. Files=9, Tests=149, 2 wallclock secs ( 0.11 usr + 0.03 sys = 0.14 C +PU) D:\perl\cpan\build\Number-Format-1.73-L6b3hX>dmake install Appending installation info to D:\perl\perl\lib/perllocal.pod

    At this stage you manually patched and installed Number::Format, now your goal was Statistics::Basic, we drop back to the cpan shell and install it as normal:

    D:\perl\cpan\build\Number-Format-1.73-L6b3hX>exit cpan> install Statistics::Basic

    All going well cpan will now install the module. Let us know if you have problems.

    Update: This isn't a stupid question, not knowing how to do this doesn't make you dumb. Nobody was born knowing how to do this. Take a look at PerlMonks for the Absolute Beginner from the Tutorials section, along with How do I post a question effectively?.

Re: Strawberry Perl cannot locate Statistics/
by CountZero (Bishop) on Jul 11, 2014 at 20:04 UTC
    If you say so yourself. :)


    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics